errors Module¶
exception classes.
-
exception
restkit.errors.AlreadyRead¶ Bases:
exceptions.Exceptionraised when a response have already been read
-
exception
restkit.errors.BadStatusLine¶ Bases:
exceptions.ExceptionException returned by the parser when the status line is invalid
-
exception
restkit.errors.ChunkMissingTerminator(term)¶
-
exception
restkit.errors.HeaderLimit¶ Bases:
restkit.errors.ParseExceptionexception raised when we gore more headers than max_header_count
-
exception
restkit.errors.InvalidChunkSize(data)¶
-
exception
restkit.errors.InvalidHTTPStatus(status)¶
-
exception
restkit.errors.InvalidHTTPVersion(version)¶
-
exception
restkit.errors.InvalidHeader(hdr)¶
-
exception
restkit.errors.InvalidHeaderName(hdr)¶
-
exception
restkit.errors.InvalidRequestLine(req)¶
-
exception
restkit.errors.InvalidRequestMethod(method)¶
-
exception
restkit.errors.InvalidUrl¶ Bases:
exceptions.ExceptionNot a valid url for use with this software.
-
exception
restkit.errors.NoMoreData(buf=None)¶
-
exception
restkit.errors.ParseException¶ Bases:
exceptions.Exception
-
exception
restkit.errors.ParserError¶ Bases:
exceptions.ExceptionGeneric exception returned by the parser
-
exception
restkit.errors.ProxyError¶ Bases:
exceptions.Exception
-
exception
restkit.errors.RedirectLimit¶ Bases:
exceptions.ExceptionException raised when the redirection limit is reached.
-
exception
restkit.errors.RequestError¶ Bases:
exceptions.ExceptionException raised when a request is malformed
-
exception
restkit.errors.RequestFailed(msg=None, http_code=None, response=None)¶ Bases:
restkit.errors.ResourceErrorException 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.
-
exception
restkit.errors.RequestTimeout¶ Bases:
exceptions.ExceptionException raised on socket timeout
-
exception
restkit.errors.ResourceError(msg=None, http_code=None, response=None)¶ Bases:
exceptions.Exceptiondefault error class
-
message¶
-
status_int= None¶
-
-
exception
restkit.errors.ResourceGone(msg=None, http_code=None, response=None)¶ Bases:
restkit.errors.ResourceErrorhttp://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.11
-
status_int= 410¶
-
-
exception
restkit.errors.ResourceNotFound(msg=None, http_code=None, response=None)¶ Bases:
restkit.errors.ResourceErrorException raised when no resource was found at the given url.
-
status_int= 404¶
-
-
exception
restkit.errors.ResponseError¶ Bases:
exceptions.ExceptionError raised while getting response or decompressing response stream
Bases:
restkit.errors.ResourceErrorException raised when an authorization is required to access to the resource specified.
-
exception
restkit.errors.UnexpectedEOF¶ Bases:
exceptions.Exceptionexception raised when remote closed the connection