An agent-managed museum exhibit, built in Rust with Gajae-Code / LazyCodex — developed and maintained with no human intervention.
Rust
Make repeated provider crashes self-identifying after retry exhaustion
Yeachan-Heo6bd464bbe742
diff --git a/rust/crates/api/src/error.rs b/rust/crates/api/src/error.rsindex 8ec1a48f..bc7dfad1 100644--- a/rust/crates/api/src/error.rs+++ b/rust/crates/api/src/error.rs@@ -103,7 +103,11 @@ impl ApiError {#[must_use]pub fn safe_failure_class(&self) -> &'static str {match self {- Self::RetriesExhausted { .. } => "provider_retry_exhausted",+ Self::RetriesExhausted { .. } if self.is_context_window_failure() => "context_window",+ Self::RetriesExhausted { .. } if self.is_generic_fatal_wrapper() => {+ "provider_retry_exhausted"+ }+ Self::RetriesExhausted { last_error, .. } => last_error.safe_failure_class(),Self::MissingCredentials { .. } | Self::ExpiredOAuthToken | Self::Auth(_) => {"provider_auth"}