mirror of
https://gitee.com/wanwujie/deer-flow
synced 2026-04-17 19:44:45 +08:00
feat: add error handling
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
import { nanoid } from "nanoid";
|
||||
import { toast } from "sonner";
|
||||
import { create } from "zustand";
|
||||
|
||||
import { chatStream, generatePodcast } from "../api";
|
||||
@@ -136,6 +137,7 @@ export async function sendMessage(
|
||||
}
|
||||
}
|
||||
} catch {
|
||||
toast("An error occurred while generating the response. Please try again.");
|
||||
// Update message status.
|
||||
// TODO: const isAborted = (error as Error).name === "AbortError";
|
||||
if (messageId != null) {
|
||||
|
||||
Reference in New Issue
Block a user