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
You need to inspect the JSON error body. The error object's type tells you it's a rate-limit error, and the message tells you whether it's requests per minute or tokens per minute, so you can choose the right backoff.
Full Explanation
The correct answer is the JSON error object's type field, which identifies 'rate_limit_error', combined with the error message field, which specifies whether the RPM or TPM limit was reached. The Anthropic API returns structured error responses with a JSON body containing an error object. The type field identifies the error category, and the message field provides a human-readable description, such as 'Rate limit exceeded: 1000 requests per minute' versus 'Rate limit exceeded: 100000 tokens per minute'. Applications that need to differentiate limit types should parse the message field. The Retry-After header option is wrong because that standard HTTP header contains a numeric seconds value for how long to wait, not a string indicating limit type. The X-RateLimit-Type header option is wrong because there is no documented X-RateLimit-Type header in the Anthropic API specification; the API provides rate limit headers, but not with this structure. The HTTP status sub-code option is wrong because HTTP does not have sub-codes; 429 is a single status code without subdivisions, and status message behavior is not standardized across HTTP clients or servers.