summaryrefslogtreecommitdiff
path: root/src/errors.rs
diff options
context:
space:
mode:
authorSanto Cariotti <santo@dcariotti.me>2022-08-21 18:48:51 +0200
committerSanto Cariotti <santo@dcariotti.me>2022-08-21 18:48:51 +0200
commit451d1db821b8d445f1bb6f1f3ad6de20f19eb85d (patch)
tree10316b0c057bd54751a461fc144fd40a80f14a84 /src/errors.rs
parent0b9e7dff080b3fcf3907da343e17ab73012e7207 (diff)
Move backend to server folder
Diffstat (limited to 'src/errors.rs')
-rw-r--r--src/errors.rs24
1 files changed, 0 insertions, 24 deletions
diff --git a/src/errors.rs b/src/errors.rs
deleted file mode 100644
index 6fd0a61..0000000
--- a/src/errors.rs
+++ /dev/null
@@ -1,24 +0,0 @@
-use axum::{
- http::StatusCode,
- response::{IntoResponse, Response},
- Json,
-};
-use serde_json::json;
-
-pub enum Error {
- Generic,
-}
-
-impl IntoResponse for Error {
- fn into_response(self) -> Response {
- let (status, error_message) = match self {
- Error::Generic => (StatusCode::INTERNAL_SERVER_ERROR, "User not found"),
- };
-
- let body = Json(json!({
- "error": error_message,
- }));
-
- (status, body).into_response()
- }
-}