mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-05 13:03:59 -06:00
Catch OSError when authorizing connection
Fixes Sentry issue CURA-1GW.
This commit is contained in:
parent
888abdac33
commit
640e038ce7
1 changed files with 3 additions and 1 deletions
|
@ -69,7 +69,9 @@ class AuthorizationHelpers:
|
|||
try:
|
||||
return self.parseTokenResponse(requests.post(self._token_url, data = data)) # type: ignore
|
||||
except requests.exceptions.ConnectionError:
|
||||
return AuthenticationResponse(success=False, err_message="Unable to connect to remote server")
|
||||
return AuthenticationResponse(success = False, err_message = "Unable to connect to remote server")
|
||||
except OSError as e:
|
||||
return AuthenticationResponse(success = False, err_message = "Operating system is unable to set up a secure connection: {err}".format(err = str(e)))
|
||||
|
||||
@staticmethod
|
||||
def parseTokenResponse(token_response: requests.models.Response) -> "AuthenticationResponse":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue