mirror of
https://github.com/httprunner/httprunner.git
synced 2026-09-05 23:51:25 +08:00
change: do not capture exception when request body is string
This commit is contained in:
@@ -49,8 +49,8 @@ def get_req_resp_record(resp_obj: Response) -> ReqRespData:
|
|||||||
try:
|
try:
|
||||||
request_body = json.loads(request_body)
|
request_body = json.loads(request_body)
|
||||||
except json.JSONDecodeError as ex:
|
except json.JSONDecodeError as ex:
|
||||||
# str: Unexpected UTF-8 BOM (decode using utf-8-sig)
|
# str: a=1&b=2
|
||||||
capture_exception(ex)
|
pass
|
||||||
except UnicodeDecodeError as ex:
|
except UnicodeDecodeError as ex:
|
||||||
# bytes/bytearray: request body in protobuf
|
# bytes/bytearray: request body in protobuf
|
||||||
capture_exception(ex)
|
capture_exception(ex)
|
||||||
|
|||||||
Reference in New Issue
Block a user