From a65654944c9838d5c01cb01ae7d1640d325ed649 Mon Sep 17 00:00:00 2001 From: oshynk <80475008+oshynk@users.noreply.github.com> Date: Thu, 22 Jul 2021 16:06:07 +0300 Subject: [PATCH] [CCTRI-2822] Fix InvalidURL issue (#23) --- code/api/client.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/code/api/client.py b/code/api/client.py index ef23b94..ba1f8b3 100644 --- a/code/api/client.py +++ b/code/api/client.py @@ -6,7 +6,8 @@ SSLError, ConnectionError, MissingSchema, - InvalidSchema + InvalidSchema, + InvalidURL ) from flask import current_app @@ -65,7 +66,7 @@ def _request(self, path, method='GET', body=None, headers=self._headers) except SSLError as error: raise SumoLogicSSLError(error) - except (ConnectionError, MissingSchema, InvalidSchema): + except (ConnectionError, MissingSchema, InvalidSchema, InvalidURL): raise SumoLogicConnectionError(self._url) except UnicodeEncodeError: raise AuthorizationError(INVALID_CREDENTIALS)