use logger.exception, not traceback.print_exception

This commit is contained in:
Ashwin Bharambe 2025-03-08 22:55:37 -08:00
parent 1bd002f39a
commit 79e8a82073

View file

@ -236,7 +236,7 @@ def create_dynamic_typed_route(func: Any, method: str, route: str):
value = func(**kwargs)
return await maybe_await(value)
except Exception as e:
traceback.print_exception(e)
logger.exception("Error executing endpoint %s", method, route)
raise translate_exception(e) from e
sig = inspect.signature(func)