From 3428a637ce420baef9aa9f9803e71bd587867005 Mon Sep 17 00:00:00 2001 From: FxQnLr Date: Wed, 10 Apr 2024 00:16:55 +0200 Subject: Closes #24. Changed postgres to json directory storage --- src/error.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/error.rs') diff --git a/src/error.rs b/src/error.rs index 006fcdb..8a011bf 100644 --- a/src/error.rs +++ b/src/error.rs @@ -11,10 +11,10 @@ use tracing::error; #[derive(Debug, thiserror::Error, ToSchema)] pub enum Error { - #[error("db: {source}")] - Db { + #[error("json: {source}")] + Json { #[from] - source: sqlx::Error, + source: serde_json::Error, }, #[error("buffer parse: {source}")] @@ -52,7 +52,7 @@ impl IntoResponse for Error { fn into_response(self) -> Response { error!("{}", self.to_string()); let (status, error_message) = match self { - Self::Db { source } => { + Self::Json { source } => { error!("{source}"); (StatusCode::INTERNAL_SERVER_ERROR, "Server Error") } -- cgit v1.2.3