Skip to content

Commit

Permalink
fix conditional to only skip for audit_history
Browse files Browse the repository at this point in the history
  • Loading branch information
keyn4 committed Apr 5, 2024
1 parent 9a0c7f7 commit d50e453
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/tap_intacct/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,15 @@ def _post_request(self, dict_body: dict, api_url: str) -> Dict:
if api_response['result']['status'] == 'success':
return api_response

if api_response['result']['status'] == 'failure' and "There was an error processing the request" in api_response['result']['errormessage']['error']['description2']:
if (
api_response['result']['status'] == 'failure'
and "There was an error processing the request"
in api_response['result']['errormessage']['error']['description2']
and dict_body["request"]["operation"]["content"]["function"]["query"][
"object"
]
== "AUDITHISTORY"
):
return {"result": "skip_and_paginate"}

if response.status_code == 400:
Expand Down

0 comments on commit d50e453

Please sign in to comment.