Skip to content

Commit

Permalink
Change exception types and messages
Browse files Browse the repository at this point in the history
  • Loading branch information
johannaengland committed Jan 31, 2023
1 parent 831c5ed commit db78ce2
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/argus_ticket_rt.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,9 @@ def create_client(endpoint, authentication):
token=authentication["token"],
)
except Exception as e:
LOG.exception("Request Tracker: Client could not be created.")
raise TicketPluginException(f"Request Tracker: {e}")
client_error = "Request Tracker: Client could not be created."
LOG.exception(client_error)
raise TicketClientException(client_error)
else:
return client

Expand All @@ -96,8 +97,9 @@ def create_client(endpoint, authentication):
),
)
except Exception as e:
LOG.exception("Request Tracker: Client could not be created.")
raise TicketPluginException(f"Request Tracker: {e}")
client_error = "Request Tracker: Client could not be created."
LOG.exception(client_error)
raise TicketClientException(client_error)
else:
return client

Expand Down

0 comments on commit db78ce2

Please sign in to comment.