From 1b94dcb72dd2598a1af9713c7fbd234dccb00658 Mon Sep 17 00:00:00 2001 From: debugtalk Date: Thu, 4 Jun 2020 15:42:12 +0800 Subject: [PATCH] change: do not capture exception when request body is string --- httprunner/client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/httprunner/client.py b/httprunner/client.py index d396917e..0923d16e 100644 --- a/httprunner/client.py +++ b/httprunner/client.py @@ -49,8 +49,8 @@ def get_req_resp_record(resp_obj: Response) -> ReqRespData: try: request_body = json.loads(request_body) except json.JSONDecodeError as ex: - # str: Unexpected UTF-8 BOM (decode using utf-8-sig) - capture_exception(ex) + # str: a=1&b=2 + pass except UnicodeDecodeError as ex: # bytes/bytearray: request body in protobuf capture_exception(ex)