Skip to content

Commit bff71e6

Browse files
- Handle use case where response body is empty
1 parent ae18be5 commit bff71e6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

client_encryption/api_encryption.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,10 @@ def encrypt_jwe_payload(conf, body):
107107
@staticmethod
108108
def decrypt_jwe_payload(conf, body):
109109
decrypted_body = decrypt_jwe(body, conf)
110-
payload = json.dumps(decrypted_body).encode('utf-8')
110+
try:
111+
payload = json.dumps(decrypted_body).encode('utf-8')
112+
except:
113+
payload = decrypted_body
111114

112115
return payload
113116

0 commit comments

Comments
 (0)