From 622443d1637986d0fea1ce6d4e170b99feb81ea5 Mon Sep 17 00:00:00 2001 From: dcore94 Date: Fri, 24 Sep 2021 11:26:06 +0200 Subject: [PATCH] add body to output when error --- pyexecplugins/HttpBridge.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyexecplugins/HttpBridge.py b/pyexecplugins/HttpBridge.py index 5954434..9752599 100644 --- a/pyexecplugins/HttpBridge.py +++ b/pyexecplugins/HttpBridge.py @@ -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: