From 66aae232c5442c92c0b1a1cbb9238632e33ef5f8 Mon Sep 17 00:00:00 2001 From: iamdoubz <> Date: Mon, 6 Jul 2026 13:43:23 -0500 Subject: [PATCH] fix(calendar): use shared errorMessage() for PST import errors Tauri commands reject with a {kind, message} object, not a native Error, so `e instanceof Error ? e.message : String(e)` always fell through to String(e) -> "[object Object]", hiding the actual readpst failure reason. --- src/lib/stores/calendar.svelte.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/stores/calendar.svelte.ts b/src/lib/stores/calendar.svelte.ts index b4d67f7..2b95bfd 100644 --- a/src/lib/stores/calendar.svelte.ts +++ b/src/lib/stores/calendar.svelte.ts @@ -1,7 +1,7 @@ // Imported calendar events (Phase 6, FR-CAL-*). Svelte 5 runes store, same // shape as settings.svelte.ts/meetings.svelte.ts. -import { api, events, type CalendarEvent } from "../api"; +import { api, errorMessage, events, type CalendarEvent } from "../api"; class CalendarStore { events = $state([]); @@ -30,7 +30,7 @@ class CalendarStore { await api.importPst(path, password); await this.load(); } catch (e) { - this.importError = e instanceof Error ? e.message : String(e); + this.importError = errorMessage(e); } finally { this.importing = false; this.importProgress = null;