Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
OAuth2: don't parse error as JSON #7467
If there's an OAuth error there's not much you can programmatically do: log the error, check it later, fix the bug, if any, or wait until the server fixes the problem, etc. You won't programmatically fix the error by checking the response body. That's why I think that it's better we don't do anything with the body. Just include it as an exception message.
If you really want to parse it, just do