Skip to content

Extractors doc: correct linked example section #3349

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions axum/src/docs/extract.md
Original file line number Diff line number Diff line change
Expand Up @@ -269,9 +269,9 @@ If an extractor fails it will return a response with the error and your
handler will not be called. To customize the error response you have two
options:

1. Use `Result<T, T::Rejection>` as your extractor like shown in ["Optional
extractors"](#optional-extractors). This works well if you're only using
the extractor in a single handler.
1. Use `Result<T, T::Rejection>` as your extractor like shown in
["Handling extractor rejections"](#handling-extractor-rejections).
This works well if you're only using the extractor in a single handler.
2. Create your own extractor that in its [`FromRequest`] implementation calls
one of axum's built in extractors but returns a different response for
rejections. See the [customize-extractor-error] example for more details.
Expand Down
Loading