Skip to content

Commit

Permalink
Merge pull request #36 from Mastercard/feature/handle-empty-response
Browse files Browse the repository at this point in the history
Handle use case where response body is empty
  • Loading branch information
rfeelin authored Jun 28, 2024
2 parents 599cc68 + ae18be5 commit 7e2eaa0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion client_encryption/api_encryption.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,10 @@ def decrypt_field_level_payload(headers, conf, body):
return body

decrypted_body = decrypt_field_level(body, conf, params)
payload = json.dumps(decrypted_body).encode('utf-8')
try:
payload = json.dumps(decrypted_body).encode('utf-8')
except:
payload = decrypted_body

return payload

Expand Down
2 changes: 1 addition & 1 deletion client_encryption/version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
__version__ = "1.20.0"
__version__ = "1.21.0"

0 comments on commit 7e2eaa0

Please sign in to comment.