MCPcopy
hub / github.com/coder/mux / fail

Method fail

vscode/src/webview/createVscodeOrpcLink.ts:174–187  ·  view source on GitHub ↗
(error: unknown)

Source from the content-addressed store, hash-verified

172 }
173
174 fail(error: unknown): void {
175 if (this.done) {
176 return;
177 }
178
179 this.done = true;
180 this.cleanup();
181 this.error = error instanceof Error ? error : new Error(String(error));
182
183 while (this.pending.length > 0) {
184 const waiter = this.pending.shift();
185 waiter?.reject(this.error);
186 }
187 }
188
189 cancel(reason: string): void {
190 if (this.done) {

Callers 2

cancelMethod · 0.95
createVscodeOrpcLinkFunction · 0.45

Calls 1

cleanupMethod · 0.95

Tested by

no test coverage detected