Next.js Discord

Discord Forum

Will removing "await" still execute the DB call?

Unanswered
Nile tilapia posted this in #help-forum
Open in Discord
Original message was deleted.

2 Replies

- If an error occurs during the database operation, it will not be caught by the surrounding try...catch block (if you have one) because you are not awaiting the result.
- To handle potential errors properly, you would need to set up additional error handling, such as a .catch() on the promise.