Simplify handlers & IPC client: move from Result pattern to throwing errors (#120)

This commit is contained in:
Will Chen
2025-05-09 15:14:12 -07:00
committed by GitHub
parent 26305ee090
commit c71638a508
25 changed files with 618 additions and 990 deletions

View File

@@ -27,12 +27,8 @@ export default function SettingsPage() {
setIsResetting(true);
try {
const ipcClient = IpcClient.getInstance();
const result = await ipcClient.resetAll();
if (result.success) {
showSuccess("Successfully reset everything. Restart the application.");
} else {
showError(result.message || "Failed to reset everything.");
}
await ipcClient.resetAll();
showSuccess("Successfully reset everything. Restart the application.");
} catch (error) {
console.error("Error resetting:", error);
showError(