diff --git a/backend/open_webui/utils/middleware.py b/backend/open_webui/utils/middleware.py index 0e32bf626..9a4f93a41 100644 --- a/backend/open_webui/utils/middleware.py +++ b/backend/open_webui/utils/middleware.py @@ -644,7 +644,7 @@ async def process_chat_payload(request, form_data, metadata, user, model): request, form_data, model, extra_params ) except Exception as e: - return Exception(f"Error: {e}") + raise Exception(f"Error: {e}") tool_ids = form_data.pop("tool_ids", None) files = form_data.pop("files", None)