diff --git a/backend/open_webui/tools/builtin.py b/backend/open_webui/tools/builtin.py index fa8e02bc91..d7e1ec9c84 100644 --- a/backend/open_webui/tools/builtin.py +++ b/backend/open_webui/tools/builtin.py @@ -2965,7 +2965,10 @@ async def upload_file_to_terminal( return json.dumps( {'error': f'Upload failed (HTTP {response.status}): {detail}'} ) - result = await response.json() + try: + result = await response.json() + except Exception: + result = {} return json.dumps( {