Hyperlinkv0.9.0-beta.0

Hyperlink

Hyperlink.ProtocolMismatchclasssrc/Hyperlink.ts:232

An RPC call failed with a signature that means the client transport doesn't match the server (classic: http client → WebSocket server → Effect's "empty HTTP response" defect). Remapped at the Hyperlink.client boundary so the failure is catchable by _tag instead of looking like an opaque RpcClientDefect. Topology already designs this out on the blessed path (Node.connect derives the transport); this is the legible backstop when an escape-hatch protocol is still wrong.

errorsHyperlink.clientNode.connect
Source src/Hyperlink.ts:23213 lines
export class ProtocolMismatch extends Data.TaggedError("ProtocolMismatch")<{
  readonly serviceKey: string;
  readonly method: string;
  readonly cause: unknown;
}> {
  override get message() {
    return (
      `Hyperlink "${this.serviceKey}" method "${this.method}" hit a transport/protocol mismatch ` +
      `(often an http client dialing a WebSocket server). Use Node.connect / the node's declared ` +
      `kind (protocolWebsocket / Hyperlink.ws), not a guessed transport.`
    );
  }
}