From: Sasha Laundy Date: Mon, 8 Apr 2013 17:03:13 +0000 (-0400) Subject: Make json error message more specific X-Git-Tag: v1.2.1~21^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8ebeb3dc3fa82bf9d670af2b54a23d9a0b161e35;p=services%2Fpython-requests.git Make json error message more specific --- diff --git a/docs/user/quickstart.rst b/docs/user/quickstart.rst index d046640..cb4ef57 100644 --- a/docs/user/quickstart.rst +++ b/docs/user/quickstart.rst @@ -131,7 +131,8 @@ There's also a builtin JSON decoder, in case you're dealing with JSON data:: >>> r.json() [{u'repository': {u'open_issues': 0, u'url': 'https://github.com/... -In case the JSON decoding fails, ``r.json`` raises an exception: ``ValueError: +In case the JSON decoding fails, ``r.json`` raises an exception. For example, if +the response gets a 401 (Unauthorized), attempting ``r.json`` raises ``ValueError: No JSON object could be decoded``