PhpStorm 2020.2 Help

Code Inspection: Missing await for an async function call

Missing await for an async function call results in having a Promise where a value was expected.

When the 'Report for promises in return statements' checkbox is checked, this inspection will also suggest adding 'await' in return statements.
While this is generally not necessary, it gives two main benefits.
The first one is that you won't forget to add 'await' when surrounding your code with try-catch.
The second one is that having explicit 'await' helps V8 runtime to provide async stack traces .

Last modified: 08 May 2020