200-901 Understanding and Using APIs Practice Question
A developer is writing a Python script that consumes a REST API which returns JSON error bodies. The script must distinguish client mistakes from server-side problems and react accordingly. Which TWO HTTP status code ranges or codes indicate conditions the client should handle as errors caused by the request or by the server rather than success? (Choose two.)
⚠ Common exam trap
The trap here is lumping all non-200 responses into one error bucket, ignoring that 3xx and 1xx responses are not failures at all.
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
✓
4xx client error status codes
The 4xx class identifies requests the client got wrong, and the 5xx class identifies server-side failures. Together they form the error conditions a consuming script must branch on: 4xx usually requires fixing the request, while 5xx usually warrants retries with backoff. Success codes, redirections, and informational responses belong to different handling paths.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
3xx redirection status codes
Why it's wrong here
The 3xx class signals that further action, usually following a Location header, is needed to complete the request. Most HTTP libraries follow redirects automatically, so these are not terminal errors. Classifying redirections as failures would misreport successful calls that simply moved to another URL.
- ✗
200 OK
Why it's wrong here
A 200 OK status means the request succeeded and the response body carries the requested representation. It is the normal success path for GET calls, so the script should parse the payload rather than branch into error handling. Treating 200 as an error would misclassify every successful retrieval and break normal processing.
- ✓
4xx client error status codes
Why this is correct
Codes in the 4xx class indicate the request itself was flawed, such as 400 for malformed syntax, 401 for missing credentials, 403 for insufficient permission, or 404 for an unknown resource. The script should inspect these codes and avoid blind retries, since resending the same request typically reproduces the same failure until the request is corrected.
- ✗
101 Switching Protocols
Why it's wrong here
101 is an informational response confirming a protocol upgrade, such as moving from HTTP to WebSocket. It is not a failure and does not indicate a bad request or server fault. Treating it as an error would misfire during legitimate upgrade handshakes and confuse the script's control flow.
- ✓
5xx server error status codes
Why this is correct
The 5xx class means the server failed to fulfill an apparently valid request, as with 500 internal errors or 503 service unavailable. These are worth retrying with backoff because the client's request may be correct. The script should log them and apply retry logic rather than altering the request payload.
Go deeper
Related to this question
About these practice questions
One of 975 original 200-901 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Cisco exam blueprint
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.