fix(code-runtime): contain hostile boundary failures

This commit is contained in:
Tianyi Cui committed 2026-08-08 21:27:57 +08:00
1 parent f84f63ccd7
commit 71e0eeac40
2 files changed
+26 -1

No files matched your search

@@ -49,7 +49,11 @@ export type RuntimeBindingReply =
* @returns the caller-facing diagnostic text.
*/
export function runtimeErrorMessage(error: unknown): string {
return error instanceof Error ? error.message : String(error)
try {
return error instanceof Error ? error.message : String(error)
} catch {
return 'binding rejected with an unrenderable value'
}
}
/**