Added json error data to RequestError exception for future debugging.
2 files changed, 4 insertions(+), 2 deletions(-)

M tinder/binder.py
M tinder/exceptions.py
M tinder/binder.py +1 -1
@@ 111,7 111,7 @@ def bind_api(**config):
             data = response.json()
             if 'status' in data:
                 if data['status'] != self.success_status_code:
-                    raise RequestError(data['status'])
+                    raise RequestError(data, data['status'])
             return self.data_model(data, self.api) \
                 if self.data_model is not None else data
 

          
M tinder/exceptions.py +3 -1
@@ 7,4 7,6 @@ class AuthorizationError(Exception):
 
 
 class RequestError(Exception):
-    pass
+    def __init__(self, json_data, *args, **kwargs):
+        self._json_data = json_data
+        super(RequestError, self).__init__(*args, **kwargs)