fixup for e266a4f40a
, print exceptions again
This commit is contained in:
parent
eda0fe29b2
commit
a3d548cd4b
|
@ -22,6 +22,7 @@ from sqlalchemy.ext.asyncio import AsyncSession
|
||||||
|
|
||||||
from obs.api.db import User, make_session, connect_db
|
from obs.api.db import User, make_session, connect_db
|
||||||
from obs.api.utils import get_single_arg
|
from obs.api.utils import get_single_arg
|
||||||
|
from sqlalchemy.util import asyncio
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
@ -56,7 +57,7 @@ logging.getLogger("sanic.error").addFilter(NoConnectionLostFilter)
|
||||||
|
|
||||||
@app.exception(SanicException, BaseException)
|
@app.exception(SanicException, BaseException)
|
||||||
async def _handle_sanic_errors(_request, exception):
|
async def _handle_sanic_errors(_request, exception):
|
||||||
if exception is asyncio.CancelledError:
|
if isinstance(exception, asyncio.CancelledError):
|
||||||
return None
|
return None
|
||||||
|
|
||||||
log.error("Exception in handler: %s", exception, exc_info=True)
|
log.error("Exception in handler: %s", exception, exc_info=True)
|
||||||
|
|
Loading…
Reference in a new issue