From 69fe55ad54468948c13af520a498ed4aeac194ed Mon Sep 17 00:00:00 2001 From: rtkay123 Date: Thu, 17 Jul 2025 14:00:40 +0200 Subject: chore: convert to workspace --- src/error.rs | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 src/error.rs (limited to 'src/error.rs') diff --git a/src/error.rs b/src/error.rs deleted file mode 100644 index 730f99a..0000000 --- a/src/error.rs +++ /dev/null @@ -1,26 +0,0 @@ -use axum::{ - http::StatusCode, - response::{IntoResponse, Response}, -}; - -#[derive(Debug)] -pub struct AppError(anyhow::Error); - -impl IntoResponse for AppError { - fn into_response(self) -> Response { - ( - StatusCode::INTERNAL_SERVER_ERROR, - format!("Something went wrong: {}", self.0), - ) - .into_response() - } -} - -impl From for AppError -where - E: Into, -{ - fn from(err: E) -> Self { - Self(err.into()) - } -} -- cgit v1.2.3