API docs: fresco.exceptions

exception fresco.exceptions.BadRequest(content=None, **kwargs)[source]

Return a 400 Bad Request response

exception fresco.exceptions.Forbidden(content=None, **kwargs)[source]

Return a 403 Forbidden response

Use this when you want to flag that the user does not have permission to access a resource and that there is no possiblity to do so (eg they are already logged in, but their account does not have the right access permissions)

exception fresco.exceptions.NotFound(content=None, **kwargs)[source]

Raised when a view needs to signal a 404 not found condition.

exception fresco.exceptions.OptionsLoadedException[source]

The options object has already been loaded

fresco.exceptions.Redirect

alias of RedirectTemporary

exception fresco.exceptions.RedirectPermanent(*args, **kwargs)[source]

Return a 301 Moved Permanently response. Example:

raise RedirectPermanent(’http://example.org/’)

exception fresco.exceptions.RedirectTemporary(*args, **kwargs)[source]

Return a 302 Found response. Example:

raise RedirectTemporary(’http://example.org/’)

exception fresco.exceptions.ResponseException(content=None, **kwargs)[source]

An exception class with an associated fresco.response.Response instance that will render a suitable error page.

is_final = True

If true, the error response will be returned immediately without trying any other routes.

exception fresco.exceptions.Unauthorized(content=None, **kwargs)[source]

Return a 401 Unauthorized response.

Use this when you want to flag that the user does not have permission to access a resource but may be able to gain access, eg by logging in.