Skip to content

Commit a32bb7a

Browse files
committed
refactor: display throw error on toast message
1 parent 59b5815 commit a32bb7a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

frontend/src/components/ChatDraftDrawer.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ const ChatDraftDrawer = ({
9090
setLoadingAIDraft(false);
9191
} catch (error) {
9292
console.error(error);
93-
toast.error("Failed to draft with AI. Try again!");
93+
toast.error(error instanceof Error ? error.message : String(error));
9494
setLoadingAIDraft(false);
9595
}
9696
}

0 commit comments

Comments
 (0)