We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5c3cf2f commit 0af5a99Copy full SHA for 0af5a99
src/azure-cli-testsdk/azure/cli/testsdk/utilities.py
@@ -223,8 +223,12 @@ def _replace_email_address(self, text):
223
def process_request(self, request):
224
request.uri = self._replace_email_address(request.uri)
225
if request.body:
226
- body = _byte_to_str(request.body)
227
- request.body = self._replace_email_address(body)
+ try:
+ body = _byte_to_str(request.body)
228
+ request.body = self._replace_email_address(body)
229
+ except UnicodeDecodeError:
230
+ # If the body is not a string, we cannot decode it, so we skip the replacement
231
+ pass
232
return request
233
234
def process_response(self, response):
0 commit comments