on main help sign in
refactor: use http.Status... consts

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

commit9365343e4f1c16e695029026ff7a97ba6320d73f authorCarlos Alexandro Becker <caarlos0@users.noreply.github.com> dateWed 24 Sep 2025, 14:29 (1 year ago) parent1be21ca
1 file changed+1−1
internal/llm/provider/anthropic.go+1−1
internal/llm/provider/anthropic.go+1−1
@@ -507,7 +507,7 @@ func (a *anthropicClient) shouldRetry(attempts int, err error) (bool, int64, err
507507 }
508508
509509 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 {
511511 return false, 0, err
512512 }
513513