diff options
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/ec2/__init__.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/nova/api/ec2/__init__.py b/nova/api/ec2/__init__.py index 416783c45..937e1ed80 100644 --- a/nova/api/ec2/__init__.py +++ b/nova/api/ec2/__init__.py @@ -627,9 +627,13 @@ class Executor(wsgi.Application): context=context) return ec2_error(req, request_id, type(ex).__name__, unicode(ex)) except Exception as ex: - extra = {'environment': req.environ} - LOG.exception(_('Unexpected error raised: %s'), unicode(ex), - extra=extra, context=context) + env = req.environ.copy() + for k in env.keys(): + if not isinstance(env[k], basestring): + env.pop(k) + + LOG.exception(_('Unexpected error raised: %s'), unicode(ex)) + LOG.error(_('Environment: %s') % utils.dumps(env)) return ec2_error(req, request_id, 'UnknownError', _('An unknown error has occurred. ' 'Please try your request again.')) |
