From e5856bf6bc0abe3f79b94558302b2018906ab682 Mon Sep 17 00:00:00 2001 From: Konstantinos Karmas Date: Tue, 17 Aug 2021 15:52:12 +0200 Subject: [PATCH] Log the connection error message produced by the request --- cura/OAuth2/AuthorizationHelpers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cura/OAuth2/AuthorizationHelpers.py b/cura/OAuth2/AuthorizationHelpers.py index 5b95b3a3bb..df3fc366ba 100644 --- a/cura/OAuth2/AuthorizationHelpers.py +++ b/cura/OAuth2/AuthorizationHelpers.py @@ -48,8 +48,8 @@ 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") + except requests.exceptions.ConnectionError as connection_error: + return AuthenticationResponse(success = False, err_message = f"Unable to connect to remote server: {connection_error}") def getAccessTokenUsingRefreshToken(self, refresh_token: str) -> "AuthenticationResponse": """Request the access token from the authorization server using a refresh token.