Show error alert in sendMessage function
This commit is contained in:
@@ -2675,6 +2675,8 @@ async function sendMessage() {
|
|||||||
)
|
)
|
||||||
setInput(composerSnapshot)
|
setInput(composerSnapshot)
|
||||||
setComposerAttachments(attachmentSnapshot)
|
setComposerAttachments(attachmentSnapshot)
|
||||||
|
window.alert(getErrorText(error))
|
||||||
|
return
|
||||||
}
|
}
|
||||||
const errorMsg = { role: 'assistant', content: 'Error: ' + getErrorText(error), id: `msg-${Date.now()}-${Math.random()}` }
|
const errorMsg = { role: 'assistant', content: 'Error: ' + getErrorText(error), id: `msg-${Date.now()}-${Math.random()}` }
|
||||||
setChatSessions(prevSessions =>
|
setChatSessions(prevSessions =>
|
||||||
|
|||||||
Reference in New Issue
Block a user