Skip to content

Commit 3e4ddd9

Browse files
committed
cleanup
1 parent 382d94c commit 3e4ddd9

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

services/web/server/src/simcore_service_webserver/exception_handling_factory.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,10 @@ async def _exception_handler(
107107
def to_exceptions_handlers_map(
108108
exc_to_http_error_map: ExceptionToHttpErrorMap,
109109
) -> ExceptionHandlersMap:
110-
"""Converts { exc_type: (status, msg), ... } -> { exc_type: callable, ... }"""
110+
"""Data adapter to convert ExceptionToHttpErrorMap ot ExceptionHandlersMap, i.e.
111+
- from { exc_type: (status, msg), ... }
112+
- to { exc_type: callable, ... }
113+
"""
111114
exc_handlers_map: ExceptionHandlersMap = {
112115
exc_type: create_exception_handler_from_http_info(
113116
status_code=info.status_code, msg_template=info.msg_template
@@ -118,9 +121,9 @@ def to_exceptions_handlers_map(
118121
return exc_handlers_map
119122

120123

121-
def create_http_error_exception_handlers_map():
124+
def create_http_error_exception_handlers_map() -> ExceptionHandlersMap:
122125
"""
123-
Creates handles for all web.HTTPError
126+
Auto create handlers for **all** web.HTTPError
124127
"""
125128
exc_handlers_map: ExceptionHandlersMap = {
126129
exc_type: create_exception_handler_from_http_info(

0 commit comments

Comments
 (0)