Fix exceptions to assign the exception to a variable (#248)

so that the logger can properly use it.
This commit is contained in:
Mike Terzo
2016-06-06 20:09:36 -04:00
committed by Corey Hammerton
parent d471663880
commit 00b2699d02

View File

@@ -34,10 +34,10 @@ def get_or_abort(func, *args, **kwargs):
except HTTPError as e: except HTTPError as e:
log.error(str(e)) log.error(str(e))
abort(e.response.status_code) abort(e.response.status_code)
except ConnectionError: except ConnectionError as e:
log.error(str(e)) log.error(str(e))
abort(500) abort(500)
except EmptyResponseError: except EmptyResponseError as e:
log.error(str(e)) log.error(str(e))
abort(204) abort(204)