200-901 Software Development and Design Practice Question
A Python script uses a try/except block to handle API errors. If the API returns a 429 status code, which mechanism should the script implement to handle the error appropriately?
⚠ Common exam trap
Cisco often tests the distinction between handling transient errors (like 429) versus permanent errors (like 404 or 500), and the trap here is that candidates may choose to immediately retry (D) or log and continue (C) without understanding that 429 specifically requires a delay before retry.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Wait for the time specified in the Retry-After header and then retry
A 429 status code indicates the client has sent too many requests in a given amount of time (rate limiting). The HTTP specification (RFC 6585) recommends including a Retry-After header in the response, which tells the client how long to wait before retrying. Implementing a wait based on this header and then retrying is the correct and respectful way to handle rate limiting, allowing the script to eventually succeed without overwhelming the server.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Switch to a different API endpoint
Why it's wrong here
A 429 signals rate limiting, so changing endpoint does not address the throttling and may breach the same quota. It is tempting when one endpoint is degraded, and would be correct if the API returned 404 or 500 indicating that specific resource was unavailable.
- ✓
Wait for the time specified in the Retry-After header and then retry
Why this is correct
HTTP 429 signals rate limiting, and the Retry-After header specifies how long to wait before retrying. Honouring that value respects the server's throttling window, satisfying the stem's requirement to handle the error appropriately rather than retrying immediately or abandoning the request.
- ✗
Log the error and continue without retrying
Why it's wrong here
Logging and continuing abandons the request entirely, so the rate-limited operation never completes and no backoff is applied. Logging suits audit trails for non-critical failures, but a 429 signals a temporary throttle that requires waiting and retrying after the Retry-After interval.
- ✗
Immediately retry the same request without delay
Why it's wrong here
Retrying instantly resends requests while the server's rate window is still exhausted, deepening the throttle and risking a ban. Immediate retry fits transient network blips, whereas 429 demands honouring Retry-After or exponential backoff before the next attempt.
Go deeper
Related to this question
About these practice questions
Courseiva writes every 200-901 question from scratch — 975 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This 200-901 practice question is part of Courseiva's free Cisco certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the 200-901 exam.