core.errors

Module Contents

Classes

ReadFromClientError

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: core.errors.HTTPException

BadRequest

Not used inside the server

exception core.errors.Redirect(url, descr='Redirect', status=303)

Bases: core.errors.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: core.errors.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: core.errors.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: core.errors.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: core.errors.HTTPException

NotFound

Usually raised in view() methods from application if the given key is invalid.

exception core.errors.MethodNotAllowed(descr='Method Not Allowed')

Bases: core.errors.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: core.errors.HTTPException

NotAcceptable

Signals that the parameters supplied doesn’t match the function signature

exception core.errors.RequestTimeout(descr='The request has timed out.')

Bases: core.errors.HTTPException

RequestTimeout

This must be used for the task api to indicate it should retry

exception core.errors.Gone(descr='Gone')

Bases: core.errors.HTTPException

Gone

Not used inside the server

exception core.errors.PreconditionFailed(descr='Precondition Failed')

Bases: core.errors.HTTPException

PreconditionFailed

Mostly caused by a missing/invalid securitykey.

exception core.errors.RequestTooLarge(descr='Request Too Large')

Bases: core.errors.HTTPException

RequestTooLarge

Not used inside the server

exception core.errors.Locked(descr='Ressource is Locked')

Bases: core.errors.HTTPException

Locked

Raised if a resource cannot be deleted due to incomming relational locks

exception core.errors.Censored(descr='Unavailable For Legal Reasons')

Bases: core.errors.HTTPException

Censored

Not used inside the server

exception core.errors.InternalServerError(descr='Internal Server Error')

Bases: core.errors.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: core.errors.HTTPException

NotImplemented

Not really implemented at the moment :)

exception core.errors.BadGateway(descr='Bad Gateway')

Bases: core.errors.HTTPException

BadGateway

Not used

exception core.errors.ServiceUnavailable(descr='Service Unavailable')

Bases: core.errors.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