From 277d4a41ad000250bdb42322c8c238d2ff9a0df8 Mon Sep 17 00:00:00 2001 From: David Fischer Date: Wed, 8 Jun 2016 18:19:10 -0700 Subject: [PATCH] Note how HTTPErrors are raised --- docs/user/quickstart.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/user/quickstart.rst b/docs/user/quickstart.rst index afdabe26..cc6d32df 100644 --- a/docs/user/quickstart.rst +++ b/docs/user/quickstart.rst @@ -492,8 +492,9 @@ Errors and Exceptions In the event of a network problem (e.g. DNS failure, refused connection, etc), Requests will raise a :class:`~requests.exceptions.ConnectionError` exception. -In the rare event of an invalid HTTP response, Requests will raise an -:class:`~requests.exceptions.HTTPError` exception. +:meth:`Response.raise_for_status() ` will +raise an :class:`~requests.exceptions.HTTPError` if the HTTP request +returned an unsuccessful status code. If a request times out, a :class:`~requests.exceptions.Timeout` exception is raised.