We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 55f95f9 commit 7ed3af1Copy full SHA for 7ed3af1
src/azure-cli-testsdk/azure/cli/testsdk/utilities.py
@@ -229,8 +229,12 @@ def process_request(self, request):
229
230
def process_response(self, response):
231
if response['body']['string']:
232
- body = _byte_to_str(response['body']['string'])
233
- response['body']['string'] = self._replace_email_address(body)
+ try:
+ body = _byte_to_str(response['body']['string'])
234
+ response['body']['string'] = self._replace_email_address(body)
235
+ except UnicodeDecodeError:
236
+ # If the body is not a string, we cannot decode it, so we skip the replacement
237
+ pass
238
return response
239
240
0 commit comments