Skip to content

Commit eacd769

Browse files
committed
mypy
1 parent aefd384 commit eacd769

File tree

1 file changed

+4
-2
lines changed
  • services/web/server/src/simcore_service_webserver/exception_handling

1 file changed

+4
-2
lines changed

services/web/server/src/simcore_service_webserver/exception_handling/_base.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,13 +102,15 @@ async def __aenter__(self):
102102

103103
async def __aexit__(
104104
self,
105-
exc_type: type[Exception] | None,
106-
exc_value: Exception | None,
105+
exc_type: type[BaseException] | None,
106+
exc_value: BaseException | None,
107107
traceback: TracebackType | None,
108108
) -> bool:
109109
if (
110110
exc_value is not None
111111
and exc_type is not None
112+
and issubclass(exc_type, Exception)
113+
and isinstance(exc_value, Exception)
112114
and (exc_handler := self._get_exc_handler_or_none(exc_type, exc_value))
113115
):
114116
self._response = await exc_handler(

0 commit comments

Comments
 (0)