-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Use via extractor's rejection instead of axum::response::Response
#3261
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
base: main
Are you sure you want to change the base?
Use via extractor's rejection instead of axum::response::Response
#3261
Conversation
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.
Looks good to me, thanks.
A changelog entry would be nice. |
Regarding this being a breaking change - I guess we want to be on the safe side after the last release but it's true this was always just a bug since it's explicitly documented as using the other rejection. But to be clear, do we want to wait for 0.9 before releasing this? |
Yeah I'd like to wait. Maybe for 0.8 we should adjust the docs to reality. |
3824063
to
8498db9
Compare
@jplatte do these changelog updates look correct? |
Yeah, looks good. Thanks! |
95dcc3a
to
07dfa7a
Compare
Looks like this needs a rebase. |
Fixes #3160.
Makes the
from_request
attribute use the rejection type assigned to the extractor by theFromRequest
orFromRequestParts
implementation. This brings it in line with the behavior documented at https://docs.rs/axum/latest/axum/extract/derive.FromRequest.html#the-whole-type-at-once.Updates two tests that expected the extractor rejection to be
axum::response::Response
.