You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a global error handler and place it below all the route handlers.
Create error classes like NotFoundError, InternalServerError, etc and extend them from error. Override the statusCode and error message there.
You can directly throw these errors from the apis. The error handler will catch them automatically where you can format them as required and send in the response.
we need a document that outlines the error message format that we will be using for various types of error codes.
The text was updated successfully, but these errors were encountered: