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
1 changed files with 6 additions and 3 deletions

View File

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