Convert deadpool::PoolError into Database error
This commit is contained in:
@@ -314,6 +314,16 @@ impl From<diesel::result::Error> for Error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// This would capture any `deapool::PoolError` and treat it as a database error
|
||||||
|
// but we're only using `deadpool` for our database, so it's fine
|
||||||
|
#[cfg(feature = "server")]
|
||||||
|
impl From<diesel_async::pooled_connection::deadpool::PoolError> for Error {
|
||||||
|
#[track_caller]
|
||||||
|
fn from(err: diesel_async::pooled_connection::deadpool::PoolError) -> Self {
|
||||||
|
Error::new_here(ErrorType::Database(format!("{err}")))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[cfg(feature = "server")]
|
#[cfg(feature = "server")]
|
||||||
impl From<fred::error::Error> for Error {
|
impl From<fred::error::Error> for Error {
|
||||||
#[track_caller]
|
#[track_caller]
|
||||||
|
|||||||
Reference in New Issue
Block a user