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 interface adjustments to prepare for next major version #38

Merged
merged 3 commits into from
May 21, 2018

Conversation

Firehed
Copy link
Owner

@Firehed Firehed commented May 19, 2018

This moves an endpoint's handleException method into its own interface, so that endpoints explicitly indicate that they are capable of handling their own errors. Most endpoints will not implement this interface.

The main EndpointInterface has been adjusted to extend this new interface, so that existing behavior will remain unchanged. In the next major version, that will be removed, resulting in two main changes:

  • Implementing a new v4 endpoint will require less work, less code, and less boilerplate
  • Existing v3 endpoints that have NOT been updated to implement that interface when migrating to v4 will no longer see their error handlers called

Note that the only migration step that will be required in v4 as a result of this change is adding HandlesOwnErrorsInterface to the endpoint's existing implements list.

@Firehed Firehed merged commit 9f09b24 into master May 21, 2018
@Firehed Firehed deleted the error_interface_adjust branch May 21, 2018 06:42
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