diff options
author | FxQnLr <[email protected]> | 2024-02-12 16:00:45 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2024-02-12 16:00:45 +0100 |
commit | c663810817183c8f92a4279236ca84d271365088 (patch) | |
tree | 0c844cc883e5e474a9cdad30004108852f13f903 /src/error.rs | |
parent | da6367885d31698464e1bec122e3e673974427c6 (diff) | |
parent | 9139d76cb1cf462820b2ddfa80d9a8d55bb30996 (diff) | |
download | webol-c663810817183c8f92a4279236ca84d271365088.tar webol-c663810817183c8f92a4279236ca84d271365088.tar.gz webol-c663810817183c8f92a4279236ca84d271365088.zip |
Merge pull request #14 from FxQnLr/axum7
Axum7 & config changes
Diffstat (limited to 'src/error.rs')
-rw-r--r-- | src/error.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/error.rs b/src/error.rs index 5b82534..56d6c52 100644 --- a/src/error.rs +++ b/src/error.rs | |||
@@ -4,10 +4,10 @@ use axum::Json; | |||
4 | use axum::response::{IntoResponse, Response}; | 4 | use axum::response::{IntoResponse, Response}; |
5 | use serde_json::json; | 5 | use serde_json::json; |
6 | use tracing::error; | 6 | use tracing::error; |
7 | use crate::auth::AuthError; | 7 | use crate::auth::Error as AuthError; |
8 | 8 | ||
9 | #[derive(Debug)] | 9 | #[derive(Debug)] |
10 | pub enum WebolError { | 10 | pub enum Error { |
11 | Generic, | 11 | Generic, |
12 | Auth(AuthError), | 12 | Auth(AuthError), |
13 | DB(sqlx::Error), | 13 | DB(sqlx::Error), |
@@ -16,7 +16,7 @@ pub enum WebolError { | |||
16 | Broadcast(io::Error), | 16 | Broadcast(io::Error), |
17 | } | 17 | } |
18 | 18 | ||
19 | impl IntoResponse for WebolError { | 19 | impl IntoResponse for Error { |
20 | fn into_response(self) -> Response { | 20 | fn into_response(self) -> Response { |
21 | let (status, error_message) = match self { | 21 | let (status, error_message) = match self { |
22 | Self::Auth(err) => { | 22 | Self::Auth(err) => { |
@@ -45,4 +45,4 @@ impl IntoResponse for WebolError { | |||
45 | })); | 45 | })); |
46 | (status, body).into_response() | 46 | (status, body).into_response() |
47 | } | 47 | } |
48 | } \ No newline at end of file | 48 | } |