From a44e80ce5b7f3e8d1ab78e68688f509567bdb62d Mon Sep 17 00:00:00 2001 From: fujie Date: Mon, 12 Jan 2026 00:22:22 +0800 Subject: [PATCH] fix: resolve syntax error in community client and refine error logging --- scripts/openwebui_community_client.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/openwebui_community_client.py b/scripts/openwebui_community_client.py index 977c7fd..463b00a 100644 --- a/scripts/openwebui_community_client.py +++ b/scripts/openwebui_community_client.py @@ -260,12 +260,16 @@ class OpenWebUICommunityClient: response = requests.post(url, headers=self.headers, json=payload) + if response.status_code != 200: + try: error_detail = response.json() print( - f" [DEBUG] Update failed error detail: {json.dumps(error_detail, indent=2)}" + f" Error: Update failed ({response.status_code}): {json.dumps(error_detail, indent=2)}" ) except Exception: - print(f" [DEBUG] Update failed response text: {response.text[:1000]}") + print( + f" Error: Update failed ({response.status_code}): {response.text[:500]}" + ) response.raise_for_status() return True