diff options
author | rtkay123 <dev@kanjala.com> | 2025-07-26 19:24:38 +0200 |
---|---|---|
committer | rtkay123 <dev@kanjala.com> | 2025-07-26 19:24:38 +0200 |
commit | e26d87f4fa18999c6bcfbcf32cfa85adab11acdd (patch) | |
tree | 603c6dacb6c448984bdcc5fa2b4a9314f1a23960 /crates/auth/src/error.rs | |
parent | 236876f1d0539ac22a3977fd8599933725ad0f90 (diff) | |
download | sellershut-e26d87f4fa18999c6bcfbcf32cfa85adab11acdd.tar.bz2 sellershut-e26d87f4fa18999c6bcfbcf32cfa85adab11acdd.zip |
feat(auth): create user call
Diffstat (limited to 'crates/auth/src/error.rs')
-rw-r--r-- | crates/auth/src/error.rs | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/crates/auth/src/error.rs b/crates/auth/src/error.rs deleted file mode 100644 index 730f99a..0000000 --- a/crates/auth/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<E> From<E> for AppError -where - E: Into<anyhow::Error>, -{ - fn from(err: E) -> Self { - Self(err.into()) - } -} |