Skip to main content

WSGI middleware to handle HTTP responses using exceptions

Project description

httpexceptor build status

WSGI middleware to handle HTTP responses using exceptions

provides a group of exception classes representing non-2xx HTTP statuses, along with a WSGI middleware to turn the exceptions into proper HTTP headers

originally extracted from TiddlyWeb

source repository:


from httpexceptor import HTTPExceptor, HTTP404

# register middleware
app = HTTPExceptor(app)

# ...

if unavailable:
    raise HTTP404('resource unavailable')

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for httpexceptor, version 1.4.0
Filename, size File type Python version Upload date Hashes
Filename, size httpexceptor-1.4.0.tar.gz (4.0 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page