'Generate a WSGI response based on the exception passed to ctor.'

@webob.dec.wsgify(RequestClass=Request)
def __call__(self, req):

    user_locale = req.best_match_language()
    code = self.wrapped_exc.status_int
    fault_name = self._fault_names.get(code, 'computeFault')
    explanation = self.wrapped_exc.explanation
    LOG.debug('Returning    %(code)s    to    user:    %(explanation)s', {'code': code, 'explanation': explanation})
    explanation = i18n.translate(explanation, user_locale)
    fault_data = {fault_name: {'code': code, 'message': explanation}}
    if ((code == 413) or (code == 429)):
        retry = self.wrapped_exc.headers.get('Retry-After', None)
        if retry:
            fault_data[fault_name]['retryAfter'] = retry
    if (not req.api_version_request.is_null()):
        self.wrapped_exc.headers[API_VERSION_REQUEST_HEADER] = ('compute    ' + req.api_version_request.get_string())
        self.wrapped_exc.headers[LEGACY_API_VERSION_REQUEST_HEADER] = req.api_version_request.get_string()
        self.wrapped_exc.headers.add('Vary', API_VERSION_REQUEST_HEADER)
        self.wrapped_exc.headers.add('Vary', LEGACY_API_VERSION_REQUEST_HEADER)
    self.wrapped_exc.content_type = 'application/json'
    self.wrapped_exc.charset = 'UTF-8'
    self.wrapped_exc.text = JSONDictSerializer().serialize(fault_data)
    return self.wrapped_exc
