Skip to content

Commit

Permalink
Don't raise unnecessary stack traces in EC2 API
Browse files Browse the repository at this point in the history
exception.EC2APIError exceptions are always expected, so no reason to have a
LOG.exception when one is raised.  Furthermore nova.api.ec2.ec2_error already
logs the exception so the duplicate log statement is just removed

Fix Bug 1180973

Change-Id: I4b42a9a764f6e15bb94a383e8a725d52d7436bd7
  • Loading branch information
jogo committed May 16, 2013
1 parent a87b4e3 commit dc88726
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions nova/api/ec2/__init__.py
Expand Up @@ -501,8 +501,6 @@ def __call__(self, req):
LOG.info(_('NotFound raised: %s'), unicode(ex), context=context)
return ec2_error(req, request_id, type(ex).__name__, unicode(ex))
except exception.EC2APIError as ex:
LOG.exception(_('EC2APIError raised: %s'), unicode(ex),
context=context)
if ex.code:
return ec2_error(req, request_id, ex.code, unicode(ex))
else:
Expand Down

0 comments on commit dc88726

Please sign in to comment.