diff --git a/src/errors.rs b/src/errors.rs index 0c56fcf..140598a 100644 --- a/src/errors.rs +++ b/src/errors.rs @@ -1,11 +1,15 @@ -use axum::http::StatusCode; -use axum::response::{IntoResponse, Response}; +use axum::{ + http::StatusCode, + response::{IntoResponse, Response}, +}; use tracing::error; +/// App error for conversion to anyhow error. pub struct AppError(anyhow::Error); impl IntoResponse for AppError { fn into_response(self) -> Response { + // Log error. error!("{:?}", self.0); StatusCode::BAD_REQUEST.into_response()