Skip to content

Commit

Permalink
comment resolved
Browse files Browse the repository at this point in the history
  • Loading branch information
Ashutosh619-sudo committed Oct 13, 2024
1 parent b67eb29 commit f8343fe
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion sageintacctsdk/apis/api_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,12 @@ def __post_request(self, dict_body: dict, api_url: str):
parsed_response = json.loads(json.dumps(parsed_xml))

if raw_response.status_code == 200:
logger.debug('Response for post request: %s', raw_response.text)
if (parsed_response['response']['control']['status'] == 'failure' or parsed_response['response']['operation']['authentication']['status'] == 'failure' or \
parsed_response['response']['operation']['result']['status'] == 'failure'):
logger.info('Response for post request: %s', raw_response.text)
else:
logger.debug('Response for post request: %s', raw_response.text)

if parsed_response['response']['control']['status'] == 'success':
api_response = parsed_response['response']['operation']

Expand Down

0 comments on commit f8343fe

Please sign in to comment.