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
The error handler and how errors are handled need to be fixed.
The global error handler has an issue. To reproduce the error, once the server is running visit a route that does not exist, and the request will hang on until the server timeout. Example: visit: http://localhost:8080/api/user or http://localhost:8080/this-does-not-exist
Asynchronous errors need to be handled: currently on the route try ... catch were used to hand asynchronous errors. We can get rid of it and make the code more cleaner and maintainable. This way once can 'throw new Error' and it would be handled, also an unhandled exception would be captured. This will help us remove multiple try...catch in all the route handlers.
The text was updated successfully, but these errors were encountered:
The error handler and how errors are handled need to be fixed.
http://localhost:8080/api/user
orhttp://localhost:8080/this-does-not-exist
try ... catch
were used to hand asynchronous errors. We can get rid of it and make the code more cleaner and maintainable. This way once can 'throw new Error' and it would be handled, also an unhandled exception would be captured. This will help us remove multipletry...catch
in all the route handlers.The text was updated successfully, but these errors were encountered: