From 4bcb58b3eb05393c944229479b1685de522946ae Mon Sep 17 00:00:00 2001 From: snowak-homeoffice Date: Mon, 16 Mar 2026 13:29:14 +0100 Subject: [PATCH] Preserve HTTP errors from pipeline inlet filters --- backend/open_webui/main.py | 2 ++ backend/open_webui/routers/pipelines.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/backend/open_webui/main.py b/backend/open_webui/main.py index 18981940ad..af281fff8c 100644 --- a/backend/open_webui/main.py +++ b/backend/open_webui/main.py @@ -1893,6 +1893,8 @@ async def chat_completion( pass finally: raise # re-raise to ensure proper task cancellation handling + except HTTPException: + raise except Exception as e: log.debug(f"Error processing chat payload: {e}") if metadata.get("chat_id") and metadata.get("message_id"): diff --git a/backend/open_webui/routers/pipelines.py b/backend/open_webui/routers/pipelines.py index 24cf6682c7..90c03ac12e 100644 --- a/backend/open_webui/routers/pipelines.py +++ b/backend/open_webui/routers/pipelines.py @@ -101,7 +101,7 @@ async def process_pipeline_inlet_filter(request, payload, user, models): else {} ) if "detail" in res: - raise Exception(response.status, res["detail"]) + raise HTTPException(status_code=e.status, detail=res["detail"]) except Exception as e: log.exception(f"Connection error: {e}")