Bird
Raised Fist0

Identify the error in this HTTP response header:

medium📝 Debug Q6 of Q15
Rest API - Rate Limiting and Throttling

Identify the error in this HTTP response header:

HTTP/1.1 503 Service Unavailable
Retry-After: 3.5
ARetry-After header name is misspelled
B503 status code is invalid
CRetry-After value must be an integer or HTTP-date
DRetry-After cannot be used with 503 status
Step-by-Step Solution
Solution:
  1. Step 1: Check Retry-After value format

    Retry-After must be either an integer number of seconds or a valid HTTP-date string.
  2. Step 2: Identify the problem with 3.5

    3.5 is a decimal, which is invalid for Retry-After.
  3. Final Answer:

    Retry-After value must be an integer or HTTP-date -> Option C
  4. Quick Check:

    Retry-After decimal values are invalid [OK]
Quick Trick: Retry-After only accepts integer seconds or HTTP-date [OK]
Common Mistakes:
MISTAKES
  • Using decimal numbers for Retry-After
  • Thinking 503 status disallows Retry-After
  • Misspelling header name

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes