Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle promise rejection #56

Open
Nizar7zak opened this issue Apr 14, 2022 · 0 comments
Open

Handle promise rejection #56

Nizar7zak opened this issue Apr 14, 2022 · 0 comments

Comments

@Nizar7zak
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant