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:
2 files changed
+18
-3
No files matched your search
@@ -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 }));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user