The HTTPExceptionMiddleware class is accessible via the webob.exc module.
This should be put very close to applications that might raise these exceptions. This should not be applied globally; letting expected exceptions raise through the WSGI stack is dangerous.
See the source for more information.