Bird
0
0

You are designing a client application that calls a public API which may respond with 429 Too Many Requests. How should your client handle this to avoid errors and respect the server?

hard📝 Application Q15 of 15
Rest API - HTTP Status Codes

You are designing a client application that calls a public API which may respond with 429 Too Many Requests. How should your client handle this to avoid errors and respect the server?

ARead the <code>Retry-After</code> header and wait that many seconds before retrying.
BStop all requests permanently after the first 429 response.
CIgnore the 429 response and retry immediately until successful.
DSend multiple requests in parallel to speed up retries.
Step-by-Step Solution
Solution:
  1. Step 1: Understand respectful client behavior

    Clients should avoid overwhelming servers by respecting rate limits.
  2. Step 2: Use Retry-After header properly

    The server provides Retry-After to tell clients how long to wait before retrying.
  3. Step 3: Implement waiting before retry

    Client should pause for the specified time, then retry to avoid repeated 429 errors.
  4. Final Answer:

    Read the Retry-After header and wait that many seconds before retrying. -> Option A
  5. Quick Check:

    Respect Retry-After to avoid 429 [OK]
Quick Trick: Always wait Retry-After seconds before retrying after 429 [OK]
Common Mistakes:
  • Retrying immediately ignoring Retry-After
  • Stopping requests forever after one 429
  • Sending many parallel requests causing more 429s

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes