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

⚡ Custom error handler #25

Closed
wants to merge 13 commits into from
Closed

⚡ Custom error handler #25

wants to merge 13 commits into from

Conversation

DaniFoldi
Copy link
Collaborator

This PR implements a custom error handler property on server: if an error is thrown in a route, instead of "Internal error", 500 the error handler is called. This way, the user can return a more friendly error - using as much context as is available, so accepted content types are respected, and errors are more descriptive.

The default implementation is equivalent to the old system to avoid any breaking changes. There is also an additional fallback 500 if the error handler fails.

@DaniFoldi
Copy link
Collaborator Author

Closing in favour of #32 and #33

@DaniFoldi DaniFoldi closed this Jun 24, 2024
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.

1 participant