MCPcopy Index your code
hub / github.com/di-sukharev/opencommit / replyWithError

Method replyWithError

out/cli.cjs:57534–57540  ·  view source on GitHub ↗

* Mock an undici request with a defined error.

(error)

Source from the content-addressed store, hash-verified

57532 this.validateReplyParameters(statusCode, data, responseOptions);
57533 const dispatchData = this.createMockScopeDispatchData(statusCode, data, responseOptions);
57534 const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], dispatchData);
57535 return new MockScope(newMockDispatch);
57536 }
57537 /**
57538 * Mock an undici request with a defined error.
57539 */
57540 replyWithError(error) {
57541 if (typeof error === "undefined") {
57542 throw new InvalidArgumentError("error must be defined");
57543 }

Callers

nothing calls this directly

Calls 1

addMockDispatchFunction · 0.85

Tested by

no test coverage detected