add body to output when error
This commit is contained in:
parent
6e401e3dcb
commit
622443d163
|
@ -86,7 +86,7 @@ class Plugin(PyExecPlugin):
|
||||||
hdrs1 = {}
|
hdrs1 = {}
|
||||||
hdrs2 = {}
|
hdrs2 = {}
|
||||||
if status1 == "FAILED":
|
if status1 == "FAILED":
|
||||||
msg = "{} to {} failed with status {} ({}) - ".format(self.ep1["method"], self.ep1["url"], self.response1.status_code, self.response1.reason)
|
msg = "{} to {} failed with status {} ({}) - {}".format(self.ep1["method"], self.ep1["url"], self.response1.status_code, self.response1.reason, self.response1.text)
|
||||||
if self.fail:
|
if self.fail:
|
||||||
raise Exception(msg)
|
raise Exception(msg)
|
||||||
else:
|
else:
|
||||||
|
@ -96,7 +96,7 @@ class Plugin(PyExecPlugin):
|
||||||
}
|
}
|
||||||
|
|
||||||
elif status2 == "FAILED":
|
elif status2 == "FAILED":
|
||||||
msg = "{} to {} failed with status {} ({}) - ".format(self.ep2["method"], self.ep2["url"], self.response2.status_code, self.response2.reason)
|
msg = "{} to {} failed with status {} ({}) - {}".format(self.ep2["method"], self.ep2["url"], self.response2.status_code, self.response2.reason, self.response2.text)
|
||||||
if self.fail:
|
if self.fail:
|
||||||
raise Exception(msg)
|
raise Exception(msg)
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue