Skip to content
Myr

Make json error message more specific

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Sasha Laundy · committed by Sasha Laundy · parent dfa59c2 · Browse files · 1 file+2 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+2 added−1 removed

  • other:+2 added−1 removed

1 file+2 added−1 removed

modified:docs/user/quickstart.rst+2 added-1 removed
129 unmodified lines
130 >>> r = requests.get('https://github.com/timeline.json')131 >>> r.json()132 [{u'repository': {u'open_issues': 0, u'url': 'https://github.com/...133134In case the JSON decoding fails, ``r.json`` raises an exception: ``ValueError:134In case the JSON decoding fails, ``r.json`` raises an exception. For example, if135the response gets a 401 (Unauthorized), attempting ``r.json`` raises ``ValueError:136No JSON object could be decoded``137138139Raw Response Content
278 unmodified lines