mirror of
https://github.com/tokio-rs/axum.git
synced 2025-12-03 05:47:36 +00:00
566 B
566 B
This example explores 3 different ways you can create custom rejections for already existing extractors
with_rejection: Usesaxum_extra::extract::WithRejectionto transform one rejection into anotherderive_from_request: Usesaxum_macros::FromRequestto wrap another extractor and customize the rejectioncustom_extractor: Manual implementation ofFromRequestthat wraps another extractor
Run with
cargo run -p example-customize-extractor-error