circuits.web.errors module

Errors

This module implements a set of standard HTTP Errors.

class circuits.web.errors.httperror(request, response, code=None, **kwargs)

Bases: Event

An event for signaling an HTTP error

The constructor creates a new instance and modifies the response argument to reflect the error.

code = 500
description = ''
sanitize()
class circuits.web.errors.forbidden(request, response, code=None, **kwargs)

Bases: httperror

An event for signaling the HTTP Forbidden error

The constructor creates a new instance and modifies the response argument to reflect the error.

code = 403
class circuits.web.errors.unauthorized(request, response, code=None, **kwargs)

Bases: httperror

An event for signaling the HTTP Unauthorized error

The constructor creates a new instance and modifies the response argument to reflect the error.

code = 401
class circuits.web.errors.notfound(request, response, code=None, **kwargs)

Bases: httperror

An event for signaling the HTTP Not Fouond error

The constructor creates a new instance and modifies the response argument to reflect the error.

code = 404
class circuits.web.errors.redirect(request, response, urls, code=None)

Bases: httperror

An event for signaling the HTTP Redirect response

The constructor creates a new instance and modifies the response argument to reflect a redirect response to the given url.