Skip to content
Myr

Update raise_for_status() exception output to reflect that requests.exceptions.HTTPError is raised, not urllib2.HTTPError.

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by jkleint · committed by jkleint · parent f178219 · Browse files · 1 file+3 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+3 added−3 removed

  • other:+3 added−3 removed

1 file+3 added−3 removed

modified:docs/user/quickstart.rst+3 added-3 removed
254 unmodified lines
255 404256257 >>> _r.raise_for_status()258 Traceback (most recent call last):259 File "requests/models.py", line 394, in raise_for_status260 raise self.error261 urllib2.HTTPError: HTTP Error 404: NOT FOUND259 File "requests/models.py", line 832, in raise_for_status260 raise http_error261 requests.exceptions.HTTPError: 404 Client Error262263But, since our ``status_code`` for ``r`` was ``200``, when we call264``raise_for_status()`` we get::265
187 unmodified lines