Skip to content

@chojs/message/linker ​

Implement delivery and shutdown first. Expose a sender when clients also need to publish or request replies through the connection. Connect a broker · Browse all packages

request_error ​

Make the error of a request that got no answer. It is for the senders of the adapters: ChoMessageClient.request rejects with what they throw.

ts
export function request_error(code: "CHO_MESSAGE_NO_RESPONDERS" | "CHO_MESSAGE_REQUEST_TIMEOUT", topic: string, options?: ErrorOptions): ChoError<ChoMessageErrorCode>;

Usage ​

ts
await assert.rejects(
        new ChoMessageClient(recording(request_error(code, "ping")).sender)
          .request(Ping),
        { code },
      );

Usage in message/client_test.ts

Also exported here ​

These declarations share their implementation with another entry point. Each link opens the full declaration.

ChoError, ChoMessageErrorCode, Delivery, Linked, Linker, Reply, ReplyError, RequestOptions, Route, Sender, isReplyError