Skip to content

Commit 4c57e7e

Browse files
authored
Merge pull request #264 from FlowiseAI/bugfix/Error-Message-Override
Bugfix/Override custom error message
2 parents 3756026 + 6eab2a8 commit 4c57e7e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

dist/web.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/Bot.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ export const Bot = (botProps: BotProps & { class?: string }) => {
376376
const updateErrorMessage = (errorMessage: string) => {
377377
setMessages((prevMessages) => {
378378
const allMessages = [...cloneDeep(prevMessages)];
379-
allMessages.push({ message: errorMessage, type: 'apiMessage' });
379+
allMessages.push({ message: props.errorMessage || errorMessage, type: 'apiMessage' });
380380
addChatMessage(allMessages);
381381
return allMessages;
382382
});

0 commit comments

Comments
 (0)