Skip to content

Improve error handling when deauthorizing#458

Open
jkaving wants to merge 1 commit intocpfair:masterfrom
jkaving:patch-1
Open

Improve error handling when deauthorizing#458
jkaving wants to merge 1 commit intocpfair:masterfrom
jkaving:patch-1

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 #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.

1 participant