Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #1296 from sursh/master

Add helpful error message to r.json() method
  • Loading branch information...
commit 5b937b384b187899851d62dad1be5e2ca4686a36 2 parents fa9234d + 8ebeb3d
Kenneth Reitz authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 docs/user/quickstart.rst
4 docs/user/quickstart.rst
View
@@ -131,7 +131,9 @@ 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.
+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``
Raw Response Content
Please sign in to comment.
Something went wrong with that request. Please try again.