Skip to content

Commit fc73d01

Browse files
fix exceptions handlers import
1 parent a566850 commit fc73d01

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed
Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
from servicelib.aiohttp import status
2-
from simcore_service_webserver.api_keys.errors import (
3-
ApiKeyNotFoundError,
4-
ApiKeysValueError,
5-
)
6-
from simcore_service_webserver.exceptions_handlers import (
2+
from simcore_service_webserver.api_keys.errors import ApiKeyNotFoundError
3+
4+
from ..exception_handling import (
75
ExceptionToHttpErrorMap,
86
HttpErrorInfo,
9-
create_exception_handlers_decorator,
7+
exception_handling_decorator,
8+
to_exceptions_handlers_map,
109
)
1110

1211
_TO_HTTP_ERROR_MAP: ExceptionToHttpErrorMap = {
@@ -17,7 +16,7 @@
1716
}
1817

1918

20-
handle_plugin_requests_exceptions = create_exception_handlers_decorator(
21-
exceptions_catch=(ApiKeysValueError,),
22-
exc_to_status_map=_TO_HTTP_ERROR_MAP,
19+
handle_plugin_requests_exceptions = exception_handling_decorator(
20+
to_exceptions_handlers_map(_TO_HTTP_ERROR_MAP)
2321
)
22+
# this is one decorator with a single exception handler

0 commit comments

Comments
 (0)