From a62028ea54b9a9337b92a0e16ccb7e1607d7c0e6 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sat, 24 Oct 2026 14:18:32 +0200 Subject: [PATCH] The entry's startup failure names its cause: the error code, or a plain Error's fixed text Co-Authored-By: Claude Opus 5.5 --- scripts/idunn-entry.mjs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/idunn-entry.mjs b/scripts/idunn-entry.mjs index 01018ce..8c3829d 100644 --- a/scripts/idunn-entry.mjs +++ b/scripts/idunn-entry.mjs @@ -134,7 +134,10 @@ async function main() { if (process.argv[1] && import.meta.url === pathToFileURL(process.argv[1]).href) { main().catch((error) => { - console.error(`vili idunn entry failed: ${error?.name || "Error"}`); + // The cause, from the failing code: its error code, or the fixed text of a plain Error. An fs error's message + // carries the path, so a coded error is named by its code alone. + const cause = error?.code ?? String(error?.message ?? "").slice(0, 200); + console.error(`vili idunn entry failed: ${error?.name || "Error"} ${cause}`); process.exit(1); }); }