Package restkit :: Module errors :: Class RequestFailed
[hide private]

Class RequestFailed

source code

              object --+            
                       |            
exceptions.BaseException --+        
                           |        
        exceptions.Exception --+    
                               |    
                   ResourceError --+
                                   |
                                  RequestFailed

Exception raised when an unexpected HTTP error is received in response to a request.

The request failed, meaning the remote HTTP server returned a code other than success, unauthorized, or NotFound.

The exception message attempts to extract the error

You can get the status code by e.status_int, or see anything about the response via e.response. For example, the entire result body (which is probably an HTML error page) is e.response.body.

Instance Methods [hide private]

Inherited from ResourceError: __init__, __str__

Inherited from ResourceError (private): _get_message, _set_message

Inherited from exceptions.Exception: __new__

Inherited from exceptions.BaseException: __delattr__, __getattribute__, __getitem__, __getslice__, __reduce__, __repr__, __setattr__, __setstate__, __unicode__

Inherited from object: __format__, __hash__, __reduce_ex__, __sizeof__, __subclasshook__

Class Variables [hide private]

Inherited from ResourceError: status_int

Properties [hide private]

Inherited from ResourceError: message

Inherited from exceptions.BaseException: args

Inherited from object: __class__