Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve error handling when deauthorizing #458

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jkaving
Copy link

@jkaving jkaving commented Sep 11, 2018

As mentioned in #438, if there is a server error when deauthorizing a service it might fail silently. This is because we assume that the response to the browser is JSON encoded and if not we fail with a SyntaxError.

This commit simply adds a try-catch around the JSON parsing and uses the complete response text as the message if the parsing fails.

As mentioned in cpfair#438, if there is a server error when deauthorizing a service it might fail silently. This is because we assume that the response to the browser is JSON encoded and if not we fail with a SyntaxError.

This commit simply adds a try-catch around the JSON parsing and uses the complete response text as the message if the parsing fails.
@cpfair cpfair force-pushed the master branch 2 times, most recently from da1b4e7 to 1081891 Compare July 17, 2019 00:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant