From a3d548cd4bfd0a3a8f9a823437f7108c1ea236ce Mon Sep 17 00:00:00 2001 From: Paul Bienkowski <pb@opatut.de> Date: Fri, 22 Jul 2022 13:04:28 +0200 Subject: [PATCH] fixup for e266a4f40a871a68638311d2662c80f3f1ef6cda, print exceptions again --- api/obs/api/app.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/obs/api/app.py b/api/obs/api/app.py index edd29bf..752e2ca 100644 --- a/api/obs/api/app.py +++ b/api/obs/api/app.py @@ -22,6 +22,7 @@ from sqlalchemy.ext.asyncio import AsyncSession from obs.api.db import User, make_session, connect_db from obs.api.utils import get_single_arg +from sqlalchemy.util import asyncio log = logging.getLogger(__name__) @@ -56,7 +57,7 @@ logging.getLogger("sanic.error").addFilter(NoConnectionLostFilter) @app.exception(SanicException, BaseException) async def _handle_sanic_errors(_request, exception): - if exception is asyncio.CancelledError: + if isinstance(exception, asyncio.CancelledError): return None log.error("Exception in handler: %s", exception, exc_info=True)