Merge pull request #35 from FlowiseAI/bugfix/JsonParseError

Bugfix/Add temporary fix for error message
This commit is contained in:
Henry Heng 2023-04-27 00:19:35 +01:00 committed by GitHub
commit a4b5683b92
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -137,6 +137,7 @@ export const ChatMessage = ({ chatflowid }) => {
// Handle errors
const handleError = (message = 'Oops! There seems to be an error. Please try again.') => {
message = message.replace(`Unable to parse JSON response from chat agent.\n\n`, '')
setMessages((prevMessages) => [...prevMessages, { message, type: 'apiMessage' }])
addChatMessage(message, 'apiMessage')
setLoading(false)