add body to output when error

This commit is contained in:
dcore94 2021-09-24 11:26:06 +02:00
parent 6e401e3dcb
commit 622443d163
1 changed files with 2 additions and 2 deletions

View File

@ -86,7 +86,7 @@ class Plugin(PyExecPlugin):
hdrs1 = {}
hdrs2 = {}
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:
raise Exception(msg)
else:
@ -96,7 +96,7 @@ class Plugin(PyExecPlugin):
}
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:
raise Exception(msg)
else: