Skip to content

Commit 234a55d

Browse files
author
jkleint
committed
Update raise_for_status() exception output to reflect that requests.exceptions.HTTPError is raised, not urllib2.HTTPError.
1 parent f178219 commit 234a55d

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎docs/user/quickstart.rst‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -256,9 +256,9 @@ If we made a bad request (non-200 response), we can raise it with
256256

257257
>>> _r.raise_for_status()
258258
Traceback (most recent call last):
259-
File "requests/models.py", line 394, in raise_for_status
260-
raise self.error
261-
urllib2.HTTPError: HTTP Error 404: NOT FOUND
259+
File "requests/models.py", line 832, in raise_for_status
260+
raise http_error
261+
requests.exceptions.HTTPError: 404 Client Error
262262

263263
But, since our ``status_code`` for ``r`` was ``200``, when we call
264264
``raise_for_status()`` we get::

0 commit comments

Comments
 (0)