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

Draft: Feat/add error handling middleware #26

Closed
wants to merge 2 commits into from

Conversation

Lutherwaves
Copy link
Contributor

This is still a draft

This PR will implement the following changes (but hasn't already done it)

  • Create error handler middleware
  • Define base errors and handle Internal Server Error ; Error Not Found ; Bad Request ; Storage Adapter Error
  • All routes/services/adapters can return errors, which will be handled by the middleware
  • Formatter (currently used in the routes) is moved to ApplicationErrorHandler

Stretch:

  • Error chaining in the cause

Closes #5

@Lutherwaves Lutherwaves self-assigned this Jul 9, 2024
@Lutherwaves Lutherwaves force-pushed the feat/AddErrorHandlingMiddleware branch 2 times, most recently from 03a5f50 to 1bb55a4 Compare July 13, 2024 09:57
@Lutherwaves Lutherwaves force-pushed the feat/AddErrorHandlingMiddleware branch from 1bb55a4 to 1d3e58a Compare July 21, 2024 07:31
* Refactor formatter to responder
* Add logic to handle errors
* Add basic error types
* Integrate with validator
@Lutherwaves Lutherwaves force-pushed the feat/AddErrorHandlingMiddleware branch from 1d3e58a to be40655 Compare August 3, 2024 05:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add error handling middleware
1 participant