diff --git a/servicenow_api/servicenow_api.py b/servicenow_api/servicenow_api.py index 764e1b2..6bdced5 100644 --- a/servicenow_api/servicenow_api.py +++ b/servicenow_api/servicenow_api.py @@ -75,9 +75,7 @@ def __init__( urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) if username and password and client_id and client_secret: - auth_headers = { - "Content-Type": "application/x-www-form-urlencoded" - } + auth_headers = {"Content-Type": "application/x-www-form-urlencoded"} auth_data = { "grant_type": grant_type, "client_id": client_id, @@ -91,7 +89,7 @@ def __init__( response = response.json() except Exception as e: print(f"Error Authenticating with OAuth: \n\n{e}") - raise AuthError + raise e self.headers = { "Authorization": f'Bearer {response["access_token"]}', "Content-Type": "application/json", diff --git a/servicenow_api/version.py b/servicenow_api/version.py index ecf3703..ab949b2 100644 --- a/servicenow_api/version.py +++ b/servicenow_api/version.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # coding: utf-8 -__version__ = '0.20.16' +__version__ = "0.20.16" __author__ = "Audel Rouhi" __credits__ = "Audel Rouhi"