From 78c09100752210d9ba075128d0f8692a7df5f76a Mon Sep 17 00:00:00 2001 From: Bryan Helmkamp Date: Mon, 23 Mar 2026 13:10:24 -0400 Subject: [PATCH] Map all 5xx status codes to ServerError Expands the HTTP status code mapping from 500-504 to 500-599 so that uncommon 5xx codes (505, 507, etc.) are correctly classified as retryable ServerError instead of falling through to message-based heuristics. The existing 529 (Overloaded) handling is subsumed by the broader range. Co-Authored-By: Claude Opus 4.6 (1M context) --- lib/crates/fabro-llm/src/error.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/crates/fabro-llm/src/error.rs b/lib/crates/fabro-llm/src/error.rs index 2f29b7b83..e1a54dd65 100644 --- a/lib/crates/fabro-llm/src/error.rs +++ b/lib/crates/fabro-llm/src/error.rs @@ -232,7 +232,7 @@ pub fn error_from_status_code( } 413 => ProviderErrorKind::ContextLength, 429 => ProviderErrorKind::RateLimit, - 500..=504 | 529 => ProviderErrorKind::Server, + 500..=599 => ProviderErrorKind::Server, // For ambiguous status codes (400, 422, etc.), use message-based classification _ => { let lower_msg = detail.message.to_lowercase();