From 10d24fbfa283ee9384f62d999e09675a9fe3c060 Mon Sep 17 00:00:00 2001 From: fujie Date: Thu, 8 Jan 2026 08:41:50 +0800 Subject: [PATCH] debug: add detailed error logging for create_post --- scripts/openwebui_community_client.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/openwebui_community_client.py b/scripts/openwebui_community_client.py index 5e22bd3..59ba9ee 100644 --- a/scripts/openwebui_community_client.py +++ b/scripts/openwebui_community_client.py @@ -164,7 +164,14 @@ class OpenWebUICommunityClient: "data": data or {}, "media": media or [], } + print(f" [DEBUG] Payload keys: {list(payload.keys())}") + print( + f" [DEBUG] data.function keys: {list(payload.get('data', {}).get('function', {}).keys()) if payload.get('data') else 'N/A'}" + ) response = requests.post(url, headers=self.headers, json=payload) + if response.status_code != 200: + print(f" [DEBUG] Response status: {response.status_code}") + print(f" [DEBUG] Response body: {response.text[:500]}") response.raise_for_status() return response.json() except Exception as e: