-
Notifications
You must be signed in to change notification settings - Fork 3
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 handlers are responsible for HTTP response #252
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bittrance
force-pushed
the
errorhandler-does-http
branch
from
April 26, 2023 13:43
7a8f34e
to
31fa4d2
Compare
bittrance
force-pushed
the
errorhandler-does-http
branch
2 times, most recently
from
April 28, 2023 14:20
c2aa5e6
to
f020306
Compare
bittrance
added a commit
that referenced
this pull request
May 4, 2023
…ddleware. There are two reasons for this: the first is that the packaged middleware tends to return 400 rather than more correct 4XX codes. The second reason is that this switch helps #252.
bittrance
force-pushed
the
errorhandler-does-http
branch
from
May 4, 2023 15:44
f020306
to
b73343a
Compare
Pull Request Test Coverage Report for Build 4884765398
💛 - Coveralls |
bittrance
force-pushed
the
errorhandler-does-http
branch
from
May 8, 2023 14:14
dde5d1c
to
ffdc4de
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few nitpicks
bittrance
added a commit
that referenced
this pull request
May 9, 2023
bittrance
force-pushed
the
errorhandler-does-http
branch
from
May 10, 2023 07:08
20034d7
to
fa3ed69
Compare
simongottschlag
approved these changes
May 10, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fantastic work @bittrance! 🚀
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Allow error handlers to return an abstract HTTP response which the framework is then responsible for rendering. This allows users to return e.g. structured and localized responses from the middleware.
This is a breaking change in that existing error handlers need a signature change and
return nil
to retain existing behavior.This is an alternative to #251 as discussed in that PR. Fixes #249 .