Skip to content

Commit

Permalink
properly use tracings dyn Error support
Browse files Browse the repository at this point in the history
  • Loading branch information
Lachstec committed Nov 3, 2024
1 parent 5d0e2c0 commit fa781b4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions axum-extra/src/response/error_response.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ use tracing::error;
#[derive(Debug)]
pub struct InternalServerError<T>(pub T);

impl<T: Error> IntoResponse for InternalServerError<T> {
impl<T: Error + 'static> IntoResponse for InternalServerError<T> {
fn into_response(self) -> Response {
let err = &self.0;
error!(%err);
error!(error = err as &dyn Error);
(
StatusCode::INTERNAL_SERVER_ERROR,
"An error occurred while processing your request.",
Expand Down

0 comments on commit fa781b4

Please sign in to comment.