A team is implementing rate limit handling for a high-volume Claude API integration and wants to distinguish between different 429 error sub-types to apply different backoff strategies. The API returns a 429 with JSON body. Which field in the error response should the application inspect to differentiate request-per-minute limits from token-per-minute limits?
Select an answer to reveal the explanation.
Short Explanation and Infographic
Here's the deal — b is correct because the Anthropic API returns structured error responses with a JSON body containing an error object. The type field identifies the error category (e.g., 'rate_limit_error') and the message field provides a human-readable description specifying which limit was exceeded (e.g., 'Rate limit exceeded: 1000 requests per minute' vs.
Full explanation below image
Full Explanation
B is correct because the Anthropic API returns structured error responses with a JSON body containing an error object. The type field identifies the error category (e.g., 'rate_limit_error') and the message field provides a human-readable description specifying which limit was exceeded (e.g., 'Rate limit exceeded: 1000 requests per minute' vs. 'Rate limit exceeded: 100000 tokens per minute'). Applications that need to differentiate limit types should parse the message field. A is wrong because the Retry-After header is a standard HTTP header that contains a numeric seconds value (how long to wait before retrying), not a string indicating limit type. C is wrong because there is no documented X-RateLimit-Type header in the Anthropic API specification; the API does provide rate limit headers but not with this specific structure. D is wrong because HTTP does not have sub-codes; 429 is a single status code without subdivisions, and status message field behavior is not standardized across HTTP clients or servers.