ClientVerifyErrorErrors default-on / deep client verify may surface on addressed client Layers.
export type type ClientVerifyError =
| NodeUnreachable
| UnaddressedNode
| ProtocolUnanswered
| ServiceNotServed
| ServiceNotReady
| ContractMismatch
Errors default-on / deep client verify may surface on addressed client Layers.
ClientVerifyError =
| class NodeUnreachableclass NodeUnreachable {
message: string;
name: string;
stack: string;
cause: unknown;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
toString: () => string;
toJSON: () => unknown;
_tag: Tag;
node: string;
url: string;
}
A remote
Node
that didn't answer at its declared address — down, wrong port/url, or (for a
socket node) a server not speaking the socket protocol. Surfaced eagerly by
verifyConnection
so a client fails fast at startup instead of hanging or erroring opaquely at the first call.
NodeUnreachable
| class UnaddressedNodeclass UnaddressedNode {
message: string;
name: string;
stack: string;
cause: unknown;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
toString: () => string;
toJSON: () => unknown;
_tag: Tag;
node: string;
}
Deriving a transport from a node that never declared one — a bare Node.Tag()("x") has no
address/kind, so connect / listen can't know how to reach it. Surfaces on the Layer / Effect
error channel (never a sync throw).
UnaddressedNode
| class ProtocolUnansweredclass ProtocolUnanswered {
message: string;
name: string;
stack: string;
cause: unknown;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
toString: () => string;
toJSON: () => unknown;
_tag: Tag;
node: string;
url: string;
kind: ProtocolKind;
}
Transport answered, but the Effect RPC protocol did not — typically something else is listening
on the address (wrong process / wrong protocol). Surfaced by
Hyperlink.verifyConnection
(node, { deep: true }) after the cheap reachability probe
succeeds.
ProtocolUnanswered
| class ServiceNotServedclass ServiceNotServed {
message: string;
name: string;
stack: string;
cause: unknown;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
toString: () => string;
toJSON: () => unknown;
_tag: Tag;
node: string;
url: string;
serviceKey: string;
served: ReadonlyArray<string>;
}
The peer answered the node-status RPC, but the target resource key is not in status.services.
Surfaced by
Hyperlink.verifyConnection
(node, { deep: true, resource }).
ServiceNotServed
| class ServiceNotReadyclass ServiceNotReady {
message: string;
name: string;
stack: string;
cause: unknown;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
toString: () => string;
toJSON: () => unknown;
_tag: Tag;
node: string;
url: string;
serviceKey: string;
detail: string | undefined;
}
The peer serves the target resource, but reports it not ready (ready: false).
Surfaced by
Hyperlink.verifyConnection
(node, { deep: true, resource }).
ServiceNotReady
| class ContractMismatchclass ContractMismatch {
message: string;
name: string;
stack: string;
cause: unknown;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
toString: () => string;
toJSON: () => unknown;
_tag: Tag;
node: string;
url: string;
serviceKey: string;
expected: string;
actual: string | undefined;
}
Client and server disagree on a HyperService's wire contract (contractHash mismatch).
Surfaced by
Hyperlink.verifyConnection
(node, { deep: true, serviceKey, contractHash })
and by default-on addressed
Hyperlink.client
verify (F4).
ContractMismatch;