using ua->get_p in an async helper #1849
-
The only way I can find to get rid of the "Unhandled rejected promise: ..." warning when using an async helper is to use catch:
Are there any better alternatives? Edit: a test case to demo the issue: |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Thank you for posting. Sorry, I don't know async/await syntax yet. |
Beta Was this translation helpful? Give feedback.
-
Every |
Beta Was this translation helpful? Give feedback.
-
For the record, now I resort to:
|
Beta Was this translation helpful? Give feedback.
Every
await
throws an exception, like a normal blocking operation. They bubble up through the stack and will need to be caught somewhere. That is exactly how it's supposed to work. Either you add acatch
handler to the outermost promise, or youtry/catch
the thrown exception.