]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
httpclient: Document that HTTPError is not the only possible error
authorBen Darnell <ben@bendarnell.com>
Sat, 14 Nov 2015 17:09:03 +0000 (12:09 -0500)
committerBen Darnell <ben@bendarnell.com>
Sat, 14 Nov 2015 17:10:12 +0000 (12:10 -0500)
tornado/httpclient.py

index 9179227b1e3e584cb6c03970765528847f46c242..25b17d039dc89622b4c7ca15120a31a2b26c292f 100644 (file)
@@ -211,10 +211,12 @@ class AsyncHTTPClient(Configurable):
         kwargs: ``HTTPRequest(request, **kwargs)``
 
         This method returns a `.Future` whose result is an
-        `HTTPResponse`.  By default, the ``Future`` will raise an `HTTPError`
-        if the request returned a non-200 response code. Instead, if
-        ``raise_error`` is set to False, the response will always be
-        returned regardless of the response code.
+        `HTTPResponse`. By default, the ``Future`` will raise an
+        `HTTPError` if the request returned a non-200 response code
+        (other errors may also be raised if the server could not be
+        contacted). Instead, if ``raise_error`` is set to False, the
+        response will always be returned regardless of the response
+        code.
 
         If a ``callback`` is given, it will be invoked with the `HTTPResponse`.
         In the callback interface, `HTTPError` is not automatically raised.