mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 21:19:01 +08:00
Defensive programming: Catch case where 'error_description' is missing in response.
This commit is contained in:
parent
c16096c223
commit
273f85c182
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user