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

Allow top-level error handler within dispatcher #37

Merged
merged 6 commits into from
May 21, 2018
Merged

Conversation

Firehed
Copy link
Owner

@Firehed Firehed commented May 19, 2018

This creates a new interface for handling any exception that an endpoint throws without forcing the endpoint to implement its own error handler.

The end-goal for this is to be able to extract the handleException method in EndpointInterface into its own interface, so that in the next major (?) version, error handling at a per-endpoint level becomes completely optional. This cuts way down on boilerplate, since relatively few endpoints (in my experience) need their own error handling logic, and the main use case for that tended to be for formatting the response to an appropriate content-type based on what was implied (but not actually stated!) by the request.

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