Practice – devcor_350-901_api

Strength:
0%
Answered: 0 • Correct: 0 • Incorrect: 0

Logged in as Guest

Complete the exception type used to catch a requests timeout.

Drag the correct code snippets from the options panel into the placeholders in the code window.

import requests try: requests.get("https://api.example.com/slow", timeout=2) except requests.exceptions.{{1}}: print("timeout")

Drag a snippet from the right into each blank box in the code.

Available snippets

HTTPError
SSLError
ConnectionError
RequestException
ValueError
Timeout
KeyError