tweak: unserializable error handling

pull/7178/head
Aiden Cline 2026-01-07 00:29:13 -06:00
parent 61c334f1fb
commit 04cea9cf11
1 changed files with 4 additions and 3 deletions

View File

@ -47,9 +47,10 @@ export function FormatUnknownError(input: unknown): string {
if (typeof input === "object" && input !== null) {
try {
const json = JSON.stringify(input, null, 2)
if (json && json !== "{}") return json
} catch {}
return JSON.stringify(input, null, 2)
} catch {
return "Unexpected error (unserializable)"
}
}
return String(input)