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

Error Handling Middleware #32

Open
rugulous opened this issue Sep 6, 2022 · 0 comments
Open

Error Handling Middleware #32

rugulous opened this issue Sep 6, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@rugulous
Copy link
Member

rugulous commented Sep 6, 2022

We should probably have some form of custom middleware that deals with any errors that arise

Obviously we shouldn't have any errors in the first place (!), but it would be much better if we can deal with them and at least squeak out a 500 error instead of the whole site just dying

It could even do different things depending on the type of exception raised - validation exceptions, authentication exceptions and sequelize exceptions will all map to different status codes, and we could perhaps even drill deeper!

@rugulous rugulous added the enhancement New feature or request label Sep 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant