tapiriik icon indicating copy to clipboard operation
tapiriik copied to clipboard

Improve error handling when deauthorizing

Open jkaving opened this issue 6 years ago • 0 comments

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.

jkaving avatar Sep 11 '18 08:09 jkaving