print response text if failed to extract check item from response

This commit is contained in:
debugtalk
2018-04-16 00:44:22 +08:00
parent ddfec58cc3
commit f4f13f682d
2 changed files with 5 additions and 2 deletions

View File

@@ -196,7 +196,9 @@ class Context(object):
# type 2 or type 3
check_value = resp_obj.extract_field(check_item)
except exception.ParseResponseError:
raise exception.ParseResponseError("failed to extract check item in response!")
msg = "failed to extract check item from response!\n"
msg += "response: {}".format(resp_obj.resp_text)
raise exception.ParseResponseError(msg)
validator["check_value"] = check_value