Convert deadpool::PoolError into Database error

This commit is contained in:
2026-06-27 17:06:02 -04:00
parent f8e2dad58a
commit 86291f1eb5

View File

@@ -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")]
impl From<fred::error::Error> for Error {
#[track_caller]