ezidam: conversion of error types
This commit is contained in:
parent
2425a4cb50
commit
f949f7606d
2 changed files with 111 additions and 2 deletions
|
|
@ -1,7 +1,31 @@
|
|||
use super::Error;
|
||||
|
||||
impl From<settings::Error> for Error {
|
||||
fn from(e: settings::Error) -> Error {
|
||||
impl From<rocket::tokio::task::JoinError> for Error {
|
||||
fn from(e: rocket::tokio::task::JoinError) -> Self {
|
||||
Error::internal_server_error(e)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<rocket_db_pools::sqlx::Error> for Error {
|
||||
fn from(e: rocket_db_pools::sqlx::Error) -> Self {
|
||||
Error::internal_server_error(e)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<hash::Error> for Error {
|
||||
fn from(e: hash::Error) -> Self {
|
||||
Error::internal_server_error(e)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<settings::Error> for Error {
|
||||
fn from(e: settings::Error) -> Self {
|
||||
Error::internal_server_error(e)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<users::Error> for Error {
|
||||
fn from(e: users::Error) -> Self {
|
||||
Error::internal_server_error(e)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue