mirror of
https://github.com/tokio-rs/axum.git
synced 2025-09-26 20:40:29 +00:00
Extractors doc: correct linked example section (#3349)
This commit is contained in:
parent
ff031867df
commit
2977bd4adf
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user