Bird
0
0

A client receives this response:

medium📝 Debug Q6 of 15
Rest API - Error Handling
A client receives this response:
HTTP/1.1 429 Too Many Requests
Retry-After: abc

What is the issue with this response?
AResponse is missing Content-Type header
BRetry-After header value is invalid
CStatus code should be 401
DRetry-After header is optional and can be ignored
Step-by-Step Solution
Solution:
  1. Step 1: Check Retry-After header format

    Retry-After must be a number (seconds) or a valid HTTP date, 'abc' is invalid.
  2. Step 2: Identify the problem

    Invalid Retry-After value can confuse clients on when to retry.
  3. Final Answer:

    Retry-After header value is invalid -> Option B
  4. Quick Check:

    Retry-After must be numeric or date, 'abc' invalid [OK]
Quick Trick: Retry-After must be numeric or date string [OK]
Common Mistakes:
  • Ignoring invalid Retry-After values
  • Confusing status code with authentication errors
  • Thinking Content-Type is required for rate limit

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes