Skip to content

Commit

Permalink
Convert r2d2 errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ja573 committed Sep 3, 2024
1 parent 180720f commit ca80fc5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions thoth-errors/src/database_errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,12 @@ impl From<diesel::result::Error> for ThothError {
}
}

impl From<diesel::r2d2::PoolError> for ThothError {
fn from(error: diesel::r2d2::PoolError) -> ThothError {
ThothError::InternalError(error.to_string())
}
}

#[cfg(test)]
mod tests {
use super::*;
Expand Down

0 comments on commit ca80fc5

Please sign in to comment.