fix(web): keep the stack when a view fails

Views caught their errors and showed only the message, so nothing said which
module or which line had failed — neither in the console, which never saw
the error, nor on the page.

The stack is now logged and offered on the page behind a disclosure, because
opening the developer console is not always an option on a self-hosted
panel.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
nocodeandClaude Opus 5 committed 2026-09-23 23:20:08 +02:00
1 parent 92c27aed9f
commit c031b4d9e2
2 files changed
+18 -3

No files matched your search

+2 -1
View File
@@ -310,8 +310,9 @@ async function renderView(host) {
const module = await import(route.module);
await module.render(host, { params: segments.slice(1), state });
} catch (error) {
console.error('[fws] échec de la vue', error);
const { errorBox } = await import('./core/ui.js');
mount(host, errorBox(error.message, { retry: () => renderView(host) }));
mount(host, errorBox(error.message, { retry: () => renderView(host), error }));
}
}