tapiriik
tapiriik copied to clipboard
Improve error handling when deauthorizing
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.