refactor: reuse is_auth_error from provider.rs, DRY backend retry logic
This commit is contained in:
@@ -57,7 +57,7 @@ fn backoff_duration(attempt: u32) -> Duration {
|
||||
/// request builders below, plus well-known auth keywords in case the body
|
||||
/// contains them. This is intentionally tighter than `contains("401")`,
|
||||
/// which could false-positive on a URL port, model name, or body text.
|
||||
fn is_auth_error(err_str: &str) -> bool {
|
||||
pub fn is_auth_error(err_str: &str) -> bool {
|
||||
let err_lower = err_str.to_lowercase();
|
||||
// Structured HTTP status patterns
|
||||
(err_str.contains("API error 401")
|
||||
|
||||
Reference in New Issue
Block a user