[lib/domain] log.error unhandled exceptions
This commit is contained in:
parent
e47ffcddb9
commit
e9c57049dd
|
@ -5,6 +5,7 @@
|
||||||
- IMPORTANT : Fix bug introduced with 0.6.20 (fix arguments handling)
|
- IMPORTANT : Fix bug introduced with 0.6.20 (fix arguments handling)
|
||||||
- Add *html* return type as default argument ret_type
|
- Add *html* return type as default argument ret_type
|
||||||
- Add *txt* return type
|
- Add *txt* return type
|
||||||
|
- Log unhandled exceptions
|
||||||
- Log HTTPException with statuscode 500 as critical
|
- Log HTTPException with statuscode 500 as critical
|
||||||
- PyJWT >=2.4.0,<2.5.0
|
- PyJWT >=2.4.0,<2.5.0
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
__version__ = '0.6.22-rc4'
|
__version__ = '0.6.22-rc5'
|
||||||
|
|
||||||
def version():
|
def version():
|
||||||
return f'HalfAPI version:{__version__}'
|
return f'HalfAPI version:{__version__}'
|
||||||
|
|
|
@ -135,6 +135,7 @@ def route_decorator(fct: FunctionType) -> Coroutine:
|
||||||
raise HTTPException(501) from exc
|
raise HTTPException(501) from exc
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
# TODO: Write tests
|
# TODO: Write tests
|
||||||
|
logger.error(exc, exc_info=True)
|
||||||
if not isinstance(exc, HTTPException):
|
if not isinstance(exc, HTTPException):
|
||||||
raise HTTPException(500) from exc
|
raise HTTPException(500) from exc
|
||||||
raise exc
|
raise exc
|
||||||
|
|
Loading…
Reference in New Issue