MCPcopy Index your code
hub / github.com/TanStack/ai / fail

Method fail

packages/ai-opencode/src/stream/queue.ts:36–43  ·  view source on GitHub ↗

Signal failure; pending and future reads reject (after buffered values drain).

(error: unknown)

Source from the content-addressed store, hash-verified

34
35 /** Signal failure; pending and future reads reject (after buffered values drain). */
36 fail(error: unknown): void {
37 if (this.ended || this.failed) return
38 this.failed = true
39 this.error = error
40 for (const waiter of this.waiters.splice(0)) {
41 waiter.reject(error)
42 }
43 }
44
45 [Symbol.asyncIterator](): AsyncIterator<T> {
46 return {

Callers 1

chatStreamMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected