fix: narrow acpx health failure handling

This commit is contained in:
Peter Steinberger
2026-03-13 16:28:31 +00:00
parent 3f37afd18c
commit 261a40dae1

View File

@@ -606,13 +606,16 @@ export class AcpxRuntime implements AcpRuntime {
if (!result.ok) { if (!result.ok) {
this.healthy = false; this.healthy = false;
const failure = result.failure;
return { return {
ok: false, ok: false,
code: "ACP_BACKEND_UNAVAILABLE", code: "ACP_BACKEND_UNAVAILABLE",
message: message:
result.failure.error instanceof Error failure.kind === "exception"
? result.failure.error.message ? failure.error instanceof Error
: String(result.failure.error), ? failure.error.message
: String(failure.error)
: "acpx backend unavailable",
}; };
} }