core.errors
¶
Module Contents¶
Classes¶
ReadFromClientError |
- exception core.errors.HTTPException(status, name, descr)¶
Bases:
Exception
Base-Class for all Exceptions that should match to an http error-code
- process(self)¶
- exception core.errors.BadRequest(descr='The request your browser sent cannot be fulfilled due to bad syntax.')¶
Bases:
HTTPException
BadRequest
Not used inside the server
- exception core.errors.Redirect(url, descr='Redirect', status=303)¶
Bases:
HTTPException
Causes an 303 - See Other (or 302 - Found if requested / 301 - Moved Permanently) redirect
- exception core.errors.Unauthorized(descr="The resource is protected and you don't have the permissions.")¶
Bases:
HTTPException
Unauthorized
Raised whenever a request hits an path protected by canAccess() or a canAdd/canEdit/… -Function inside an application returns false.
- exception core.errors.PaymentRequired(descr='Payment Required')¶
Bases:
HTTPException
PaymentRequired
Not used inside the server. This status-code is reserved for further use and is currently not supported by clients.
- exception core.errors.Forbidden(descr="The resource is protected and you don't have the permissions.")¶
Bases:
HTTPException
Forbidden
Not used inside the server. May be utilized in the future to distinguish between requests from guests and users, who are logged in but don’t have the permission.
- exception core.errors.NotFound(descr='The requested resource could not be found.')¶
Bases:
HTTPException
NotFound
Usually raised in view() methods from application if the given key is invalid.
- exception core.errors.MethodNotAllowed(descr='Method Not Allowed')¶
Bases:
HTTPException
MethodNotAllowed
Raised if a function is accessed which doesn’t have the @exposed / @internalExposed decorator or if the request arrived using get, but the function has the @forcePost flag.
- exception core.errors.NotAcceptable(descr='The request cannot be processed due to missing or invalid parameters.')¶
Bases:
HTTPException
NotAcceptable
Signals that the parameters supplied doesn’t match the function signature
- exception core.errors.RequestTimeout(descr='The request has timed out.')¶
Bases:
HTTPException
RequestTimeout
This must be used for the task api to indicate it should retry
- exception core.errors.Gone(descr='Gone')¶
Bases:
HTTPException
Gone
Not used inside the server
- exception core.errors.PreconditionFailed(descr='Precondition Failed')¶
Bases:
HTTPException
PreconditionFailed
Mostly caused by a missing/invalid securitykey.
- exception core.errors.RequestTooLarge(descr='Request Too Large')¶
Bases:
HTTPException
RequestTooLarge
Not used inside the server
- exception core.errors.Locked(descr='Ressource is Locked')¶
Bases:
HTTPException
Locked
Raised if a resource cannot be deleted due to incomming relational locks
- exception core.errors.Censored(descr='Unavailable For Legal Reasons')¶
Bases:
HTTPException
Censored
Not used inside the server
- exception core.errors.InternalServerError(descr='Internal Server Error')¶
Bases:
HTTPException
InternalServerError
The catch-all error raised by the server if your code raises any python-exception not deriving from HTTPException
- exception core.errors.NotImplemented(descr='Not Implemented')¶
Bases:
HTTPException
NotImplemented
Not really implemented at the moment :)
- exception core.errors.BadGateway(descr='Bad Gateway')¶
Bases:
HTTPException
BadGateway
Not used
Bases:
HTTPException
ServiceUnavailable
Raised if the flag “viur.disabled” in conf.sharedConf is set
- class core.errors.ReadFromClientError(errors, forceFail=False)¶
Bases:
object
ReadFromClientError
Internal use only. Used as a return-value (its not raised!) to transport information on errors from fromClient in bones to the surrounding skeleton class