200-901 Software Development and Design Practice Question
A developer is implementing exception handling in Python for a function that makes an HTTP request. Which THREE exception types should be caught to handle common network and HTTP errors? (Choose three.)
⚠ Common exam trap
Cisco often tests the distinction between exceptions that represent recoverable runtime errors (ConnectionError, Timeout, HTTPError) versus exceptions that indicate programming bugs (InvalidURL) or edge-case behavior (TooManyRedirects), leading candidates to over-select or under-select the correct set.
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
✓
requests.exceptions.ConnectionError
`requests.exceptions.ConnectionError` is raised when a network connection cannot be established, such as DNS resolution failure or refused TCP connection. This is a fundamental network error that must be handled in any HTTP client to ensure robust error recovery.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
requests.exceptions.ConnectionError
Why this is correct
Raised when a connection fails (e.g., DNS failure, refused connection).
- ✗
requests.exceptions.InvalidURL
Why it's wrong here
This is also a possible exception, but not as common as the three listed; however, the question asks for common network and HTTP errors, and InvalidURL is more of a client error. The three selected are the most typical ones to handle.
- ✓
requests.exceptions.Timeout
Why this is correct
Raised when the request times out.
- ✓
requests.exceptions.HTTPError
Why this is correct
Raised when an HTTP error occurs (status code 4xx or 5xx).
- ✗
requests.exceptions.TooManyRedirects
Why it's wrong here
This is less common; the three selected are more fundamental.
Visual reference
Go deeper
Related to this question
About these practice questions
One of 989 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 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.