Skip to content

Commit

Permalink
fix: handle if response_json is None
Browse files Browse the repository at this point in the history
  • Loading branch information
Abdeali099 committed Apr 3, 2024
1 parent a0f9b2d commit fd2df24
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions india_compliance/gst_india/api_classes/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,9 @@ def _make_request(
raise e

finally:
log.output = response_json.copy()
if response_json:
log.output = response_json.copy()

self.mask_sensitive_info(log)

enqueue_integration_request(**log)
Expand Down Expand Up @@ -256,7 +258,7 @@ def mask_sensitive_info(self, log):
if key in log.request_headers:
log.request_headers[key] = "*****"

if key in log.output:
if key in log.get("output", {}):
log.output[key] = "*****"

if not log.data:
Expand Down

0 comments on commit fd2df24

Please sign in to comment.