Skip to content

Commit

Permalink
add: retries limite exeeded type of error
Browse files Browse the repository at this point in the history
  • Loading branch information
justRkive committed Nov 8, 2023
1 parent 25f6fcd commit 91995e2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/resolver/resolver_error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ pub enum ResolverError {
/// An error when the answer is empty.
#[error("empty query")]
EmptyQuery,

/// An error when the resolver surpassed the number of retries allowed.
#[error("retries limit exceeded")]
RetriesLimitExceeded,
}

// Debug trait implementation for `?` formatting
Expand All @@ -26,6 +30,7 @@ impl Debug for ResolverError {
Io(err) => write!(f, "io error: {}", err),
Message(err) => write!(f, "Error Response: {}", err),
EmptyQuery => write!(f, "Empty query"),
RetriesLimitExceeded => write!(f, "Retries limit exceeded"),
}
}
}

0 comments on commit 91995e2

Please sign in to comment.