Fix exceptions to assign the exception to a variable (#248)
so that the logger can properly use it.
This commit is contained in:
committed by
Corey Hammerton
parent
d471663880
commit
00b2699d02
@@ -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)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user