The heat.api.middleware.fault ModuleΒΆ

A middleware that turns exceptions into parsable string. Inspired by Cinder’s faultwrapper

class heat.api.middleware.fault.Fault(error)[source]

Bases: object

class heat.api.middleware.fault.FaultWrapper(application)[source]

Bases: heat.common.wsgi.Middleware

Replace error body with something the client can parse.

error_map = {'ResourceTypeNotFound': <class 'webob.exc.HTTPNotFound'>, 'RequestLimitExceeded': <class 'webob.exc.HTTPBadRequest'>, 'UnknownUserParameter': <class 'webob.exc.HTTPBadRequest'>, 'Invalid': <class 'webob.exc.HTTPBadRequest'>, 'ResourceNotFound': <class 'webob.exc.HTTPNotFound'>, 'ActionInProgress': <class 'webob.exc.HTTPConflict'>, 'RevertFailed': <class 'webob.exc.HTTPInternalServerError'>, 'StackNotFound': <class 'webob.exc.HTTPNotFound'>, 'UserParameterMissing': <class 'webob.exc.HTTPBadRequest'>, 'InvalidTemplateVersion': <class 'webob.exc.HTTPBadRequest'>, 'PhysicalResourceNotFound': <class 'webob.exc.HTTPNotFound'>, 'NotSupported': <class 'webob.exc.HTTPBadRequest'>, 'ValueError': <class 'webob.exc.HTTPBadRequest'>, 'MissingCredentialError': <class 'webob.exc.HTTPBadRequest'>, 'InvalidTemplateParameter': <class 'webob.exc.HTTPBadRequest'>, 'InvalidTemplateReference': <class 'webob.exc.HTTPBadRequest'>, 'InvalidTenant': <class 'webob.exc.HTTPForbidden'>, 'ServerBuildFailed': <class 'webob.exc.HTTPInternalServerError'>, 'InvalidTemplateSection': <class 'webob.exc.HTTPBadRequest'>, 'NotFound': <class 'webob.exc.HTTPNotFound'>, 'StackValidationFailed': <class 'webob.exc.HTTPBadRequest'>, 'Forbidden': <class 'webob.exc.HTTPForbidden'>, 'ResourceNotAvailable': <class 'webob.exc.HTTPNotFound'>, 'StopActionFailed': <class 'webob.exc.HTTPInternalServerError'>, 'StackExists': <class 'webob.exc.HTTPConflict'>, 'AttributeError': <class 'webob.exc.HTTPBadRequest'>}
process_request(req)[source]

Previous topic

The heat.api.middleware Module

Next topic

The heat.api.middleware.ssl Module

This Page