mirror of
https://github.com/tokio-rs/axum.git
synced 2026-09-06 00:00:17 +02:00
Add rejection tracing to all extractors (#2584)
This commit is contained in:
@@ -274,12 +274,13 @@ impl std::error::Error for MultipartError {
|
||||
|
||||
impl IntoResponse for MultipartError {
|
||||
fn into_response(self) -> Response {
|
||||
let body = self.body_text();
|
||||
axum_core::__log_rejection!(
|
||||
rejection_type = Self,
|
||||
body_text = self.body_text(),
|
||||
body_text = body,
|
||||
status = self.status(),
|
||||
);
|
||||
(self.status(), self.body_text()).into_response()
|
||||
(self.status(), body).into_response()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -398,12 +398,13 @@ impl FailedToDeserializePathParams {
|
||||
|
||||
impl IntoResponse for FailedToDeserializePathParams {
|
||||
fn into_response(self) -> Response {
|
||||
let body = self.body_text();
|
||||
axum_core::__log_rejection!(
|
||||
rejection_type = Self,
|
||||
body_text = self.body_text(),
|
||||
body_text = body,
|
||||
status = self.status(),
|
||||
);
|
||||
(self.status(), self.body_text()).into_response()
|
||||
(self.status(), body).into_response()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -530,7 +531,13 @@ impl std::error::Error for InvalidUtf8InPathParam {}
|
||||
|
||||
impl IntoResponse for InvalidUtf8InPathParam {
|
||||
fn into_response(self) -> Response {
|
||||
(self.status(), self.body_text()).into_response()
|
||||
let body = self.body_text();
|
||||
axum_core::__log_rejection!(
|
||||
rejection_type = Self,
|
||||
body_text = body,
|
||||
status = self.status(),
|
||||
);
|
||||
(self.status(), body).into_response()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user