diff --git a/pubky-homeserver/src/error.rs b/pubky-homeserver/src/error.rs index b6e5a14..8aa58d2 100644 --- a/pubky-homeserver/src/error.rs +++ b/pubky-homeserver/src/error.rs @@ -5,6 +5,7 @@ use axum::{ http::StatusCode, response::IntoResponse, }; +use tracing::debug; pub type Result = core::result::Result; @@ -86,36 +87,42 @@ impl From for Error { impl From for Error { fn from(error: std::io::Error) -> Self { + debug!(?error); Self::new(StatusCode::INTERNAL_SERVER_ERROR, error.into()) } } impl From for Error { fn from(error: heed::Error) -> Self { + debug!(?error); Self::new(StatusCode::INTERNAL_SERVER_ERROR, error.into()) } } impl From for Error { fn from(error: anyhow::Error) -> Self { + debug!(?error); Self::new(StatusCode::INTERNAL_SERVER_ERROR, error.into()) } } impl From for Error { fn from(error: postcard::Error) -> Self { + debug!(?error); Self::new(StatusCode::INTERNAL_SERVER_ERROR, error.into()) } } impl From for Error { fn from(error: axum::Error) -> Self { + debug!(?error); Self::new(StatusCode::INTERNAL_SERVER_ERROR, error.into()) } } impl From> for Error { fn from(error: flume::SendError) -> Self { + debug!(?error); Self::new(StatusCode::INTERNAL_SERVER_ERROR, error.into()) } }