Skip to content

Commit 11925ac

Browse files
committed
minor
1 parent 11602a2 commit 11925ac

File tree

1 file changed

+12
-13
lines changed
  • services/web/server/src/simcore_service_webserver/tags

1 file changed

+12
-13
lines changed

services/web/server/src/simcore_service_webserver/tags/_rest.py

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
from .._meta import API_VTAG as VTAG
1515
from ..exception_handling import (
16-
ExceptionToHttpErrorMap,
1716
HttpErrorInfo,
1817
exception_handling_decorator,
1918
to_exceptions_handlers_map,
@@ -32,19 +31,19 @@
3231
TagUpdate,
3332
)
3433

35-
_TO_HTTP_ERROR_MAP: ExceptionToHttpErrorMap = {
36-
TagNotFoundError: HttpErrorInfo(
37-
status.HTTP_404_NOT_FOUND,
38-
"Tag {tag_id} not found: either no access or does not exists",
39-
),
40-
TagOperationNotAllowedError: HttpErrorInfo(
41-
status.HTTP_403_FORBIDDEN,
42-
"Could not {operation} tag {tag_id}. Not found or insuficient access.",
43-
),
44-
}
45-
4634
_handle_tags_exceptions = exception_handling_decorator(
47-
to_exceptions_handlers_map(_TO_HTTP_ERROR_MAP)
35+
to_exceptions_handlers_map(
36+
{
37+
TagNotFoundError: HttpErrorInfo(
38+
status.HTTP_404_NOT_FOUND,
39+
"Tag {tag_id} not found: either no access or does not exists",
40+
),
41+
TagOperationNotAllowedError: HttpErrorInfo(
42+
status.HTTP_403_FORBIDDEN,
43+
"Could not {operation} tag {tag_id}. Not found or insuficient access.",
44+
),
45+
}
46+
)
4847
)
4948

5049

0 commit comments

Comments
 (0)