server.web.hooks_and_handlers ============================= .. py:module:: server.web.hooks_and_handlers Attributes ---------- .. autoapisummary:: server.web.hooks_and_handlers.logger Functions --------- .. autoapisummary:: server.web.hooks_and_handlers._record_exception_in_span server.web.hooks_and_handlers._handle_error server.web.hooks_and_handlers.add_hooks_and_handlers Module Contents --------------- .. py:data:: logger .. py:function:: _record_exception_in_span(error: Exception) -> None Record exception details in the current OpenTelemetry span. .. py:function:: _handle_error(request: fastapi.Request, error: Exception, status_code: Optional[int] = None) -> Any Handle all exceptions in a uniform manner. .. py:function:: add_hooks_and_handlers(app: fastapi.FastAPI) -> fastapi.FastAPI Add logging hooks and exception handlers.