INNER CODE UNIT · Python

register_exception_handlers

akutayural/APIException · api_exception/__init__.py:60

def register_exception_handlers(
        app: FastAPI,
        response_format: ResponseFormat = ResponseFormat.RESPONSE_MODEL,
        use_fallback_middleware: bool = True,
        log: bool = True,
        log_traceback: bool = True,
        log_traceback_unhandled_exception: bool = True,
        include_null_data_field_in_openapi: bool = True,
        *,
        # Dev-friendly logging customizations
        log_level: Optional[LogLevelLiteral] = None,  # if None, use current logger level
        log_request_context: bool = True,
        log_header_keys: HeaderKeys = (
                "x-request-id",
                "x-correlation-id",
                "x-amzn-trace-id",
                "x-forwarded-for",
                "user-agent",

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…