File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
services/api-server/src/simcore_service_api_server/exceptions/handlers Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change 33from fastapi .requests import Request
44from fastapi .responses import JSONResponse
55from models_library .error_codes import create_error_code
6+ from servicelib .logging_errors import create_troubleshotting_log_kwargs
67
78from ._utils import ExceptionHandler , create_error_json_response
89
@@ -37,12 +38,13 @@ async def _http_error_handler(
3738 if add_oec_to_message :
3839 error_code = create_error_code (exception )
3940 msg += f" [{ error_code } ]"
40- _logger . exception (
41- "Unexpected %s: %s" ,
42- exception . __class__ . __name__ ,
43- msg ,
44- extra = { "error_code" : error_code } ,
41+
42+ _logger . exception (
43+ ** create_troubleshotting_log_kwargs (
44+ f"Unexpected { exception . __class__ . __name__ } : { msg } " ,
45+ exception = exception ,
4546 )
47+ )
4648 return create_error_json_response (msg , status_code = status_code )
4749
4850 return _http_error_handler
You can’t perform that action at this time.
0 commit comments