fix: improve onboarding/imessage errors

This commit is contained in:
Peter Steinberger
2026-01-02 12:20:48 +01:00
parent fd4cff06ca
commit eaacebeecc
3 changed files with 13 additions and 4 deletions

View File

@@ -168,8 +168,9 @@ export class IMessageRpcClient {
let parsed: IMessageRpcResponse<unknown>;
try {
parsed = JSON.parse(line) as IMessageRpcResponse<unknown>;
} catch (_err) {
this.runtime?.error?.(`imsg rpc: failed to parse ${line}`);
} catch (err) {
const detail = err instanceof Error ? err.message : String(err);
this.runtime?.error?.(`imsg rpc: failed to parse ${line}: ${detail}`);
return;
}