The exception translation hook was logging the exception messages
before variables were interpolated, making it really unhelpful.
This patch corrects that and falls back to e.message if e.msg isn't
available.
Change-Id: I331444d577b03257db2fcc96324d020eff9bef08
return
for exc_class, to_class in v2base.FAULT_MAP.items():
if isinstance(e, exc_class):
- raise to_class(e.message)
+ raise to_class(getattr(e, 'msg', e.message))
# leaked unexpected exception, convert to boring old 500 error and
# hide message from user in case it contained sensitive details
LOG.exception(_("An unexpected exception was caught: %s") % e)