forked from Roflin/gamenight
Started reimplementation of the Rest api in actix-web
This commit is contained in:
13
backend-actix/src/schema/error.rs
Normal file
13
backend-actix/src/schema/error.rs
Normal file
@@ -0,0 +1,13 @@
|
||||
pub struct DatabaseError(pub String);
|
||||
|
||||
impl From<diesel::result::Error> for DatabaseError {
|
||||
fn from(value: diesel::result::Error) -> Self {
|
||||
DatabaseError(value.to_string())
|
||||
}
|
||||
}
|
||||
|
||||
impl From<argon2::password_hash::Error> for DatabaseError {
|
||||
fn from(value: argon2::password_hash::Error) -> Self {
|
||||
DatabaseError(value.to_string())
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user