Skip to content

Throws in async function are not catched properly and result in unhandled rejections #30

@Totalus

Description

@Totalus

This lines creates an async function at the wrong place. It causes all the throws statements within the block to not be properly catched, resulting in unhandled rejection exceptions that cannot be handled during execution.

The async statement should be placed at the promise function level instead:

return new Promise((resolve, reject) => {

Like its done in all the other places:

return new Promise(async (resolve, reject) => {

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions