From 2bdf77a726e2ce69de5511fcf702227bd6371a32 Mon Sep 17 00:00:00 2001 From: Diwakar Date: Thu, 20 Mar 2025 22:20:27 +0700 Subject: [PATCH] Fix error message propagate from pipelines Error message returned from pipelines was not being shown on UI. It showed "Connection closed". With this fix it will show the error message on the UI from the pipeline properly. --- backend/open_webui/routers/pipelines.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/open_webui/routers/pipelines.py b/backend/open_webui/routers/pipelines.py index 599208e43..10c8e9b2e 100644 --- a/backend/open_webui/routers/pipelines.py +++ b/backend/open_webui/routers/pipelines.py @@ -90,8 +90,8 @@ async def process_pipeline_inlet_filter(request, payload, user, models): headers=headers, json=request_data, ) as response: - response.raise_for_status() payload = await response.json() + response.raise_for_status() except aiohttp.ClientResponseError as e: res = ( await response.json() @@ -139,8 +139,8 @@ async def process_pipeline_outlet_filter(request, payload, user, models): headers=headers, json=request_data, ) as response: - response.raise_for_status() payload = await response.json() + response.raise_for_status() except aiohttp.ClientResponseError as e: try: res = (