diff --git a/src/lib/components/chat/Chat.svelte b/src/lib/components/chat/Chat.svelte index ca766c9f7..c48a204f9 100644 --- a/src/lib/components/chat/Chat.svelte +++ b/src/lib/components/chat/Chat.svelte @@ -1683,9 +1683,10 @@ history.messages[responseMessage.id] = responseMessage; }; - const stopResponse = () => { + const stopResponse = async () => { if (taskId) { - const res = stopTask(localStorage.token, taskId).catch((error) => { + const res = await stopTask(localStorage.token, taskId).catch((error) => { + toast.error(error); return null; });