Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
feat(bundle): improve error handling message
Elian Doran48cd06f37e07
diff --git a/apps/client/src/services/bundle.ts b/apps/client/src/services/bundle.tsindex def3156abe..c346fce8df 100644--- a/apps/client/src/services/bundle.ts+++ b/apps/client/src/services/bundle.ts@@ -36,10 +36,16 @@ export async function executeBundle(bundle: Bundle, originEntity?: Entity | null}.call(apiContext);} catch (e: any) {const note = await froca.getNote(bundle.noteId);-- const message = `Execution of JS note "${note?.title}" with ID ${bundle.noteId} failed with error: ${e?.message}`;- showError(message);- logError(message);+ toastService.showPersistent({+ title: t("toast.bundle-error.title"),+ icon: "bx bx-error-circle",+ message: t("toast.bundle-error.message", {+ id: note?.noteId,+ title: note?.title,+ message: e.message+ })+ });+ logError("Widget initialization failed: ", e);}}@@ -103,7 +109,7 @@ async function getWidgetBundlesByParent() {const note = await froca.getNote(noteId);toastService.showPersistent({title: t("toast.bundle-error.title"),- icon: "alert",+ icon: "bx bx-error-circle",message: t("toast.bundle-error.message", {id: noteId,title: note?.title,