From 2263619148296c958b4fa245d7bc3b2660578876 Mon Sep 17 00:00:00 2001 From: Igor Davydenko Date: Wed, 14 Aug 2024 15:01:37 +0200 Subject: [PATCH] style: Hide false-positive error about using exc_info outside of except block As default handler will be called right in `except` block within `error_middleware`. --- src/aiohttp_middlewares/error.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/aiohttp_middlewares/error.py b/src/aiohttp_middlewares/error.py index 4da2615..7755ea4 100644 --- a/src/aiohttp_middlewares/error.py +++ b/src/aiohttp_middlewares/error.py @@ -137,7 +137,7 @@ async def default_error_handler(request: web.Request) -> web.Response: .. versionadded:: 1.0.0 """ with error_context(request) as context: - logger.error(context.message, exc_info=True) + logger.error(context.message, exc_info=True) # noqa: LOG014 return web.json_response(context.data, status=context.status)