Skip to content
Sharp

Networking · interview question

Which exception should be caught to handle timeouts specifically in HTTP client operations?

Multiple choiceMediumchapter-11-curatedpremiumnetworkingtimeouts-and-retries
Choose one answer
Answer and explanation

Correct answer

B. HttpTimeoutException

Why

HttpTimeoutException is thrown when an HTTP operation times out. Catching this exception helps handle scenarios where the server takes too long to respond, allowing the application to implement fallback logic or retries.

Test yourself on Networking

A free test with instant, explained results. No account needed.

Start free test
All Networking questions →