fix: UnicodeDecodeError when request body in protobuf

This commit is contained in:
debugtalk
2020-05-28 14:14:10 +08:00
parent 0a7b696d8e
commit ab5c49c05d
2 changed files with 2 additions and 1 deletions

View File

@@ -11,6 +11,7 @@
- fix: ensure converted python file in utf-8 encoding
- fix: duplicate running referenced testcase
- fix: ensure compatibility issues between testcase format v2 and v3
- fix: UnicodeDecodeError when request body in protobuf
## 3.0.5 (2020-05-22)

View File

@@ -45,7 +45,7 @@ def get_req_resp_record(resp_obj: Response) -> ReqRespData:
request_body = resp_obj.request.body
try:
request_body = json.loads(request_body)
except json.JSONDecodeError:
except (json.JSONDecodeError, UnicodeDecodeError):
pass
if request_body: