Skip to content

Commit

Permalink
Internal err -> unavailable err
Browse files Browse the repository at this point in the history
  • Loading branch information
smklein committed Sep 25, 2023
1 parent 2195be9 commit da14e80
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions nexus/db-queries/src/db/datastore/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -216,9 +216,7 @@ impl DataStore {
{
let pool = self.pool_authorized(opctx).await?;
let connection = pool.get().await.map_err(|err| {
Error::internal_error(&format!(
"Failed to access DB connection: {err}"
))
Error::unavail(&format!("Failed to access DB connection: {err}"))
})?;
Ok(connection)
}
Expand All @@ -233,9 +231,7 @@ impl DataStore {
) -> Result<bb8::PooledConnection<ConnectionManager<DbConnection>>, Error>
{
let connection = self.pool.pool().get().await.map_err(|err| {
Error::internal_error(&format!(
"Failed to access DB connection: {err}"
))
Error::unavail(&format!("Failed to access DB connection: {err}"))
})?;
Ok(connection)
}
Expand Down

0 comments on commit da14e80

Please sign in to comment.