axum
axum copied to clipboard
WIP: Allow querying of HTTP status codes for query and form rejections
Motivation
axum_extra::{query::QueryRejection, form::FormRejection}
are missing a method that would allow users to query the status code without converting it into a response via IntoResponse
first.
This is useful when one wants to customize rejection responses.
Solution
Add pub fn status(&self) -> http::StatusCode
methods to both rejections.