'Overload HTTPError constructor to create a default serialized body.
This is required because not all error responses are processed
by the wsgi controller (such as auth errors), which are further up the
paste pipeline.  We serialize in XML by default (as AWS does).'

def __init__(self, detail=None):

    webob.exc.HTTPError.__init__(self, detail=detail)
    serializer = serializers.XMLResponseSerializer()
    serializer.default(self, self.get_unserialized_body())
