Defensive programming: Catch case where 'error_description' is missing in response.

This commit is contained in:
Remco Burema 2024-07-18 16:02:23 +02:00
parent c16096c223
commit 273f85c182

View file

@ -96,7 +96,7 @@ class AuthorizationHelpers:
return
if token_response.error() != QNetworkReply.NetworkError.NoError:
callback(AuthenticationResponse(success = False, err_message = token_data["error_description"]))
callback(AuthenticationResponse(success = False, err_message = token_data.get("error_description", "an unknown server error occurred")))
return
callback(AuthenticationResponse(success = True,