MCPcopy Create free account
hub / github.com/commandoperator/cmdop-sdk / streamError

Function streamError

node/src/streaming.ts:52–57  ·  view source on GitHub ↗

* Build the error to throw for a stream-terminal ERROR frame: the typed PIN * exception for a PIN-gate verdict, else the generic AgentStreamError.

(code: string, message: string)

Source from the content-addressed store, hash-verified

50 async *[Symbol.asyncIterator](): AsyncIterator<AskFrame> {
51 if (this.#consumed) throw new Error("an AskStream can only be consumed once");
52 this.#consumed = true;
53 const iterator = this.source.envelopes();
54 for (;;) {
55 const result = await withTimeout(iterator.next(), this.timeoutMs);
56 if (result.done) return;
57 const env = result.value;
58 if (env.kind === Envelope_Kind.EVENT && env.payload.case === "askEvent") {
59 let payload: unknown = env.payload.value.payloadJson;
60 try {

Callers 1

Calls 1

mapCoreErrorFunction · 0.90

Tested by

no test coverage detected