From 934c8e9c0bd9ec2fcafba6674534b05fa98d6ba4 Mon Sep 17 00:00:00 2001 From: Ajax Davis Date: Thu, 4 Dec 2025 15:04:54 +1000 Subject: [PATCH] fix: check for errorText field in tool error rendering MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit AI SDK streams use "errorText" field for tool errors, not "error". Updated MessageBubble to check both errorText and error for compatibility. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- apps/playground/src/components/chat/MessageBubble.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/playground/src/components/chat/MessageBubble.tsx b/apps/playground/src/components/chat/MessageBubble.tsx index 3fdf0f9..ef697e8 100644 --- a/apps/playground/src/components/chat/MessageBubble.tsx +++ b/apps/playground/src/components/chat/MessageBubble.tsx @@ -94,13 +94,13 @@ export function MessageBubble({ )} {/* Tool Error */} - {toolPart.error && ( + {(toolPart.errorText || toolPart.error) && (
Error:
-                            {typeof toolPart.error === 'string'
-                              ? toolPart.error
-                              : JSON.stringify(toolPart.error, null, 2)}
+                            {typeof (toolPart.errorText || toolPart.error) === 'string'
+                              ? toolPart.errorText || toolPart.error
+                              : JSON.stringify(toolPart.errorText || toolPart.error, null, 2)}
                           
)}