MCPcopy Create free account
hub / github.com/Louisym/MiniCC / is_retryable

Method is_retryable

rust/crates/api/src/error.rs:34–48  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

32impl ApiError {
33 #[must_use]
34 pub fn is_retryable(&self) -> bool {
35 match self {
36 Self::Http(error) => error.is_connect() || error.is_timeout() || error.is_request(),
37 Self::Api { retryable, .. } => *retryable,
38 Self::RetriesExhausted { last_error, .. } => last_error.is_retryable(),
39 Self::MissingApiKey
40 | Self::ExpiredOAuthToken
41 | Self::Auth(_)
42 | Self::InvalidApiKeyEnv(_)
43 | Self::Io(_)
44 | Self::Json(_)
45 | Self::InvalidSseFrame(_)
46 | Self::BackoffOverflow { .. } => false,
47 }
48 }
49}
50
51impl Display for ApiError {

Callers 1

send_with_retryMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected