-
Notifications
You must be signed in to change notification settings - Fork 401
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Raise exception if json is not the expected type
There are a few corner cases we need to handle where json isn't the typical type we expect. In those (rare) cases, we need to raise a better exception for the user's benefit. Closes #310
- Loading branch information
1 parent
28f2db8
commit fee85cf
Showing
6 changed files
with
54 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"recorded_with": "betamax/0.4.1", "http_interactions": [{"recorded_at": "2015-02-22T04:23:56", "request": {"headers": {"Content-Type": "application/json", "Accept-Charset": "utf-8", "Accept-Encoding": "gzip, deflate", "Connection": "keep-alive", "User-Agent": "github3.py/1.0.0a1", "Accept": "application/vnd.github.v3.full+json"}, "body": {"encoding": "utf-8", "string": ""}, "method": "GET", "uri": "https://api.github.com/repos/sigmavirus24/github3.py"}, "response": {"headers": {"Access-Control-Allow-Origin": "*", "X-Content-Type-Options": "nosniff", "Access-Control-Allow-Credentials": "true", "Content-Type": "application/json; charset=utf-8", "Transfer-Encoding": "chunked", "Date": "Sun, 22 Feb 2015 04:23:56 GMT", "Access-Control-Expose-Headers": "ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval", "Content-Security-Policy": "default-src 'none'", "X-GitHub-Media-Type": "github.v3; param=full; format=json", "Status": "200 OK", "ETag": "W/\"07acb8446729c2cedb1aa44279995ef3\"", "Cache-Control": "public, max-age=60, s-maxage=60", "X-XSS-Protection": "1; mode=block", "X-Frame-Options": "deny", "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", "X-RateLimit-Reset": "1424580854", "Content-Encoding": "gzip", "Server": "GitHub.com", "X-RateLimit-Limit": "60", "X-GitHub-Request-Id": "451DE374:0FF4:16646F2B:54E959DC", "X-RateLimit-Remaining": "43", "Vary": "Accept, Accept-Encoding", "X-Served-By": "474556b853193c38f1b14328ce2d1b7d", "Last-Modified": "Sun, 22 Feb 2015 02:56:55 GMT"}, "body": {"base64_string": "H4sIAAAAAAAAA62YTZPiNhCG/wrlaxgEZgizrkrt7inJbQ+bSy6UbAtbNbbkkmQoxjX/Pa8sf5IKDKNcKDDqR69a3XK3moCnQbTdb9b7zWYZCFqyIAoybvI63q6qS7AMjnVRHLo/NM9KeuKq1uEzmY2SZ8FUEDVBITMuwJgOBcVOEz6vX7brZUBP1FB1qFWBcbkxlY4IcQ/1ylFrzVQihWHCrBJZkpo446+n37agZapjWGyAB1esinccZwyYJleCclMWVxLc1K3J1eCjLAp5BuVa9L2JyGBpPdlSuMg+SYFlQ6TJGXyHJb1bR3BtHhfVWjXYQG0OPLUcjQ1RLH1YWGcHWXb/3xuiWCVbYB3rRPHKcCkeFzizBk2qjAr+Rj9Hg7UGxEp7XEprBWt2Qiw+bu7MGlIpfqLJxbpGsYTxE5z9SeSVPYjmUtm0/QtBYV3PDTvQtLRpeKSFZu/LoJ3eYFD7YIms+2j0z9M8ZcOuYsIfF5NLsSh4rKi6LI5SLThyVh1pglhdnHGMLBCui9+5+aOOF99//Hmy2Ytxr4OSm5nbOn+WjHM5lnRnT24ikJ4AQNIru3hxrH1D8NnlU4JUp7FU1Mh7h8ZtgTNQQ6Y/bSwZRksv4S0AoFxKP0+2AIC41jX7UGjfXnjL0aTPH1GXsTvyPpI1t9GOAK1U45wXjHl5cIA0pD+VkQ4iyf2wPaMh7lu72zTzkmrtgYkLGXtx8KIkLaQhOqfuPWQOvuos1TJmUMWO3lItY4Aa5bnfrUwLGZB4CRpsvZfOnkGazqMFFVlNMz/qAMGu21d1Rt/uFjG3c2ekAGkrNMXj2v+QGzlWqasdkO9+Lh0xI7QtSG6XOXccMClsWheUJb9XF9wmdohZ2P8PWBun12j7+34Zc1+uZTRkPJPdod/Rfbzbnfq9zukcXTvgFRI9gzS/VNTk9uTCVBVVzEd0hyBNTFFsrVarJme0LatLpjwz2BGAoirJUTX66Gx6Bqqekpq2Wj9amSmq90LS1Mu3AwRAt40+Wh1huv8V+lAvgS1gSix5wbSRwu+MHSlTtpCGH3nykY7ldrrNQM1XzUXClrQolohawxOOOEatbXcRBSfz85AjYBm4BnCdSsEQ0l5eV8wxGuI6zUQxNCLpgRo0EOF6Ez6tt0+b7c/Nl2j3Eu22f2MldZXOxuye1uFTGP5ch9Hu12i3s2OqWucTzHTIPlqHdghOwC4E8Q1XDPjEtca/+vtJS2FvDWCodT4afhvNov+4/+jMkgKxdBX0H5/zdP1aum8KqbksWYUyobtJGVa5rS4reDpF+5XKRK/QAxO7Mv6GoS/7zX5WECSyFtiPcP+8DM7UoHbFq3f6sC8khqbPTk31waVpEBlV264ST8ZjYPLwzF/52HtilJWsezPXxXXTfQlxbHKlZHdBJJC1uAComOgmG3Thvsq1b5G1mYzAQvBfv45uWSk70rowB1dNYx0p2oBCVliIYOaMPrAHW9q0BOn9sHv/B529Yv8uEwAA", "encoding": "utf-8", "string": ""}, "status": {"message": "OK", "code": 200}, "url": "https://api.github.com/repos/sigmavirus24/github3.py"}}, {"recorded_at": "2015-02-22T04:23:56", "request": {"headers": {"Content-Type": "application/json", "Accept-Charset": "utf-8", "Accept-Encoding": "gzip, deflate", "Connection": "keep-alive", "User-Agent": "github3.py/1.0.0a1", "Accept": "application/vnd.github.v3.full+json"}, "body": {"encoding": "utf-8", "string": ""}, "method": "GET", "uri": "https://api.github.com/repos/sigmavirus24/github3.py/git/refs/heads/develop?per_page=100"}, "response": {"headers": {"Access-Control-Allow-Origin": "*", "Content-Security-Policy": "default-src 'none'", "X-Content-Type-Options": "nosniff", "Access-Control-Allow-Credentials": "true", "Content-Type": "application/json; charset=utf-8", "Transfer-Encoding": "chunked", "Date": "Sun, 22 Feb 2015 04:23:56 GMT", "Access-Control-Expose-Headers": "ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval", "X-Frame-Options": "deny", "X-GitHub-Media-Type": "github.v3; param=full; format=json", "Status": "200 OK", "ETag": "W/\"f148066c5c6c3ba6ca6116fed0a94fb0\"", "Cache-Control": "public, max-age=60, s-maxage=60", "X-XSS-Protection": "1; mode=block", "X-Poll-Interval": "300", "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", "X-RateLimit-Reset": "1424580854", "Content-Encoding": "gzip", "Server": "GitHub.com", "X-RateLimit-Limit": "60", "X-GitHub-Request-Id": "451DE374:0FF4:16646F65:54E959DC", "X-RateLimit-Remaining": "42", "Vary": "Accept, Accept-Encoding", "X-Served-By": "d594a23ec74671eba905bf91ef329026", "Last-Modified": "Sun, 22 Feb 2015 02:56:55 GMT"}, "body": {"base64_string": "H4sIAAAAAAAAA6WOyw6DIBBF/4V146BgffwNyFRoNBAGTIzx34tx20WTbiaT3DtnzsEivth4TQKLyhAY3HDxgT1YjkuJbEqBRgAVXDW7ZLOuJr9CxOAJyM2r2lzM1Ei4U1GF/VpL4wvT6zdOiY0HI6sKHeVQ90J3WjWGSyOQy7ZW7TRgU3MueK+wH9pnV3TSHrBclOerS//r3RyCnw3O8wNTw7SJLgEAAA==", "encoding": "utf-8", "string": ""}, "status": {"message": "OK", "code": 200}, "url": "https://api.github.com/repos/sigmavirus24/github3.py/git/refs/heads/develop?per_page=100"}}]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters