Skip to content

Commit

Permalink
Make more errors retryable
Browse files Browse the repository at this point in the history
  • Loading branch information
neekolas committed Aug 20, 2024
1 parent 07f8e16 commit 7c81320
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions xmtp_mls/src/storage/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,12 @@ impl RetryableError for diesel::result::Error {
impl RetryableError for StorageError {
fn is_retryable(&self) -> bool {
match self {
Self::DieselConnect(connection) => {
matches!(connection, diesel::ConnectionError::BadConnection(_))
}
Self::DieselConnect(_) => true,
Self::DieselResult(result) => retryable!(result),
Self::Pool(_) => true,
Self::Lock(_) => true,
Self::PoolNeedsConnection => true,
Self::SqlCipherNotLoaded => true,
_ => false,
}
}
Expand Down

0 comments on commit 7c81320

Please sign in to comment.