Skip to content

Commit

Permalink
remove curl from state (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
keyn4 authored Aug 19, 2024
1 parent 8e8b57e commit f9d37ad
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions target_api/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,12 @@ def validate_response(self, response: requests.Response) -> None:
if response.status_code in [429] or 500 <= response.status_code < 600:
msg = self.response_error_message(response)
curl = self.curlify_on_error(response)
error = {"status_code": response.status_code, "body": msg, "curl": curl}
self.logger.info(f"cURL: {curl}")
error = {"status_code": response.status_code, "body": msg}
raise RetriableAPIError(error)
elif 400 <= response.status_code < 500:
msg = self.response_error_message(response)
curl = self.curlify_on_error(response)
error = {"status_code": response.status_code, "body": msg, "curl":curl}
self.logger.info(f"cURL: {curl}")
error = {"status_code": response.status_code, "body": msg}
raise FatalAPIError(error)

0 comments on commit f9d37ad

Please sign in to comment.