diff --git a/src/backend/base/langflow/schema/message.py b/src/backend/base/langflow/schema/message.py
index 706a5cc8d..39beb04d9 100644
--- a/src/backend/base/langflow/schema/message.py
+++ b/src/backend/base/langflow/schema/message.py
@@ -350,18 +350,17 @@ class ErrorMessage(Message):
flow_id: str | None = None,
) -> None:
# Get the error reason
- reason = f"**{exception.__class__.__name__}**\n"
+ reason = ""
if hasattr(exception, "body") and "message" in exception.body:
- reason += f" - **{exception.body.get('message')}**\n"
+ reason += f"{exception.body.get('message')}\n"
elif hasattr(exception, "code"):
reason += f" - **Code: {exception.code}**\n"
elif hasattr(exception, "args") and exception.args:
- reason += f" - **Details: {exception.args[0]}**\n"
+ reason += f"**{exception.args[0]}**\n"
elif isinstance(exception, ValidationError):
- reason += f" - **Details:**\n\n```python\n{exception!s}\n```\n"
+ reason += f"```python\n{exception!s}\n```\n"
else:
- reason += " - **An unknown error occurred.**\n"
-
+ reason += f"**{exception.__class__.__name__}**\n"
# Get the sender ID
if trace_name:
match = re.search(r"\((.*?)\)", trace_name)
diff --git a/src/frontend/package-lock.json b/src/frontend/package-lock.json
index 57d6c22a2..6bd431769 100644
--- a/src/frontend/package-lock.json
+++ b/src/frontend/package-lock.json
@@ -835,6 +835,7 @@
},
"node_modules/@clack/prompts/node_modules/is-unicode-supported": {
"version": "1.3.0",
+ "extraneous": true,
"inBundle": true,
"license": "MIT",
"engines": {
diff --git a/src/frontend/src/modals/IOModal/components/chatView/chatMessage/newChatMessage.tsx b/src/frontend/src/modals/IOModal/components/chatView/chatMessage/newChatMessage.tsx
index 605504a00..c29889c9e 100644
--- a/src/frontend/src/modals/IOModal/components/chatView/chatMessage/newChatMessage.tsx
+++ b/src/frontend/src/modals/IOModal/components/chatView/chatMessage/newChatMessage.tsx
@@ -243,45 +243,54 @@ export default function ChatMessage({
className="flex w-full gap-4 rounded-md p-2"
>
- Component:{" "} - { - fitViewNode( - chat.properties?.source?.id ?? "", - ); - closeChat?.(); - }} - > - {content.component} + <> + + An error occured in the{" "} + { + fitViewNode( + chat.properties?.source?.id ?? "", + ); + closeChat?.(); + }} + > + {content.component} + {" "} + Component, stopping your flow. See below for + more details. -
+ > )} +Field: {content.field}
)} {content.reason && ( - Reason:{" "}