From dd5016575f91feaf8575a9394fd20ef60fecb45f Mon Sep 17 00:00:00 2001 From: Erwan Dupard Date: Fri, 30 Jun 2017 15:37:00 +0200 Subject: [PATCH] Added stdout information about HTTP requests failure --- blih/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/blih/__init__.py b/blih/__init__.py index 189e0c5..334693d 100755 --- a/blih/__init__.py +++ b/blih/__init__.py @@ -73,6 +73,8 @@ def blih(method, resource, auth, data=None): except requests.exceptions.HTTPError: raise BlihError('An HTTP Error occured') except ValueError: + print("HTTP Code: %d" % req.status_code) + print("HTTP Response: %s" % req.content) raise BlihError('Unknown Error') if req.status_code in [400, 401, 403, 404, 405, 409]: