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 (?)

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.
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 (?)
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.