diff --git a/app/main.py b/app/main.py index d42268d..4397f80 100644 --- a/app/main.py +++ b/app/main.py @@ -435,17 +435,12 @@ def create_app() -> FastAPI: try: router_module = importlib.import_module(route_def.module) router = getattr(router_module, route_def.router_attr) - # Wrap each HTTP route handler with plugin error isolation - # and add active-plugin check per-route (not router-level) - # so WebSocket routes are NOT affected. + # Skip WebSocket routes — no wrapping, no plugin check from starlette.routing import WebSocketRoute - from fastapi import APIRouter as _AR plugin_dep = Depends(require_active_plugin(plugin_name)) for route in router.routes: if isinstance(route, WebSocketRoute): - continue # WebSocket: no wrap, no plugin check - if hasattr(route, 'endpoint'): - route.endpoint = wrap_plugin_route(route.endpoint) + continue # Add require_active_plugin to each HTTP route's dependencies if not hasattr(route, 'dependencies'): route.dependencies = []