From: Ben Darnell Date: Sat, 14 Nov 2015 17:09:03 +0000 (-0500) Subject: httpclient: Document that HTTPError is not the only possible error X-Git-Tag: v4.4.0b1~68 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c4183b86890ffadbdb23fd7beac756c7990a035e;p=thirdparty%2Ftornado.git httpclient: Document that HTTPError is not the only possible error --- diff --git a/tornado/httpclient.py b/tornado/httpclient.py index 9179227b1..25b17d039 100644 --- a/tornado/httpclient.py +++ b/tornado/httpclient.py @@ -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.