diff --git a/crates/axum-utils/src/error_wrapper.rs b/crates/axum-utils/src/error_wrapper.rs index 379325e5..e30f738d 100644 --- a/crates/axum-utils/src/error_wrapper.rs +++ b/crates/axum-utils/src/error_wrapper.rs @@ -16,13 +16,9 @@ use axum::response::{IntoResponse, Response}; use http::StatusCode; /// A simple wrapper around an error that implements [`IntoResponse`]. -pub struct ErrorWrapper(pub T); - -impl From for ErrorWrapper { - fn from(input: T) -> Self { - Self(input) - } -} +#[derive(Debug, thiserror::Error)] +#[error(transparent)] +pub struct ErrorWrapper(#[from] pub T); impl IntoResponse for ErrorWrapper where