on main help sign in
refactor: use http.Status... consts
9365343Carlos Alexandro Becker
internal/llm/provider/anthropic.go+1−1
@@ -507,7 +507,7 @@ func (a *anthropicClient) shouldRetry(attempts int, err error) (bool, int64, err
507 }
507 }
508
508
509 isOverloaded := strings.Contains(apiErr.Error(), "overloaded") || strings.Contains(apiErr.Error(), "rate limit exceeded")
509 isOverloaded := strings.Contains(apiErr.Error(), "overloaded") || strings.Contains(apiErr.Error(), "rate limit exceeded")
510− if apiErr.StatusCode != 429 && apiErr.StatusCode != 529 && !isOverloaded {
510+ if apiErr.StatusCode != http.StatusTooManyRequests && apiErr.StatusCode != 529 && !isOverloaded {
511 return false, 0, err
511 return false, 0, err
512 }
512 }
513
513