diff --git a/contrib/lib/src/databases/connection.rs b/contrib/lib/src/databases/connection.rs index 745fca84..60bb7bb0 100644 --- a/contrib/lib/src/databases/connection.rs +++ b/contrib/lib/src/databases/connection.rs @@ -119,8 +119,17 @@ impl ConnectionPool { #[inline] pub async fn get_one(rocket: &rocket::Rocket) -> Option> { match rocket.state::() { - Some(pool) => pool.get().await.ok(), - None => None + Some(pool) => match pool.get().await.ok() { + Some(conn) => Some(conn), + None => { + error_!("no connections available for `{}`", std::any::type_name::()); + None + } + }, + None => { + error_!("missing database fairing for `{}`", std::any::type_name::()); + None + } } }