Skip to content

Handle promise rejection #56

@Nizar7zak

Description

@Nizar7zak

return connection.query(sql);

If you have an error in this Promise, you will see this message " UnhandledPromiseRejection" which means you are dealing with async code, that promise is rejected but you don't handle the Rejection.
I suppose you forget add.catchhere, and you should do it to know where is the error happened

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions