Bird
0
0

A developer writes this response:

medium📝 Debug Q7 of 15
Rest API - Error Handling
A developer writes this response:
HTTP/1.1 429 Too Many Requests
Retry-After: -10

What is wrong with this Retry-After value?
ANegative values are invalid for Retry-After
BRetry-After should be a string, not a number
CRetry-After header is missing
DStatus code should be 503 instead
Step-by-Step Solution
Solution:
  1. Step 1: Understand valid Retry-After values

    Retry-After must be a positive integer or a valid HTTP date.
  2. Step 2: Identify the problem with negative value

    Negative values like -10 are invalid and do not make sense for wait time.
  3. Final Answer:

    Negative values are invalid for Retry-After -> Option A
  4. Quick Check:

    Retry-After must be positive or date, negative invalid [OK]
Quick Trick: Retry-After cannot be negative [OK]
Common Mistakes:
  • Using negative numbers for Retry-After
  • Confusing Retry-After type requirements
  • Changing status code unnecessarily

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes