Skip to content

armgit / Handy

Public Imported from GitHub
0

A free, open source, and extensible speech-to-text application that works completely offline.

fix: report failed history deletions to users (#2255)

daydreamer.jin0685192c4976
diff --git a/src/components/settings/history/HistorySettings.tsx b/src/components/settings/history/HistorySettings.tsx
index e99fcbad..46c8eefa 100644
--- a/src/components/settings/history/HistorySettings.tsx
+++ b/src/components/settings/history/HistorySettings.tsx
@@ -235,12 +235,12 @@ export const HistorySettings: React.FC = () => {
try {
const result = await commands.deleteHistoryEntry(id);
if (result.status !== "ok") {
- // Reload on failure
- loadPage();
+ throw new Error(String(result.error));
}
} catch (error) {
console.error("Failed to delete entry:", error);
loadPage();
+ throw error;
}
};