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

Fix Error Handlers and handling #66

Open
ezehlivinus opened this issue Oct 4, 2022 · 3 comments · May be fixed by #71
Open

Fix Error Handlers and handling #66

ezehlivinus opened this issue Oct 4, 2022 · 3 comments · May be fixed by #71
Assignees
Labels
enhancement New feature or request hacktoberfest

Comments

@ezehlivinus
Copy link
Contributor

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.
@ezehlivinus
Copy link
Contributor Author

@anomic30 please check this out and assigned it to me.

@ezehlivinus ezehlivinus changed the title Fix Error Handlers and error handling Fix Error Handlers and handling Oct 4, 2022
@ezehlivinus
Copy link
Contributor Author

ezehlivinus commented Oct 4, 2022

@anomic30
If I am to do this, then the existing error handling code may have to move to middleware/ because that is what it is.

@anomic30
Copy link
Owner

anomic30 commented Oct 5, 2022

Assigned @ezehlivinus

@anomic30 anomic30 added the enhancement New feature or request label Oct 5, 2022
@ezehlivinus ezehlivinus linked a pull request Oct 5, 2022 that will close this issue
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request hacktoberfest
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants