Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error 503 causing rate limit header parse failure #57

Open
willavos opened this issue Dec 12, 2024 · 0 comments
Open

Error 503 causing rate limit header parse failure #57

willavos opened this issue Dec 12, 2024 · 0 comments

Comments

@willavos
Copy link

I encountered a 'failed to parse' rate limit header log today in production, running go-anthropic v2.11.0
Our tracing picked up that we hit an error 503. Which suggests we hit an error at their load balancing / routing stage (?)

image

Hitting a 503 caused rate limit headers to fail to parse, as there was no text for any of the headers.

error(s) parsing rate limit headers: failed to parse anthropic-ratelimit-requests-limit: strconv.Atoi: parsing "": invalid syntax failed to parse anthropic-ratelimit-requests-remaining: strconv.Atoi: parsing "": invalid syntax failed to parse anthropic-ratelimit-requests-reset: parsing time "" as "2006-01-02T15:04:05Z07:00": cannot parse "" as "2006" failed to parse anthropic-ratelimit-tokens-limit: strconv.Atoi: parsing "": invalid syntax failed to parse anthropic-ratelimit-tokens-remaining: strconv.Atoi: parsing "": invalid syntax failed to parse anthropic-ratelimit-tokens-reset: parsing time "" as "2006-01-02T15:04:05Z07:00": cannot parse "" as "2006"

We may need have a way to handle these sorts of errors - which are from before their API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant