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

Method validateReplyParameters

out/cli.cjs:57495–57505  ·  view source on GitHub ↗
(statusCode, data, responseOptions)

Source from the content-addressed store, hash-verified

57493 }
57494 createMockScopeDispatchData(statusCode, data, responseOptions = {}) {
57495 const responseData = getResponseData(data);
57496 const contentLength = this[kContentLength] ? { "content-length": responseData.length } : {};
57497 const headers = { ...this[kDefaultHeaders], ...contentLength, ...responseOptions.headers };
57498 const trailers = { ...this[kDefaultTrailers], ...responseOptions.trailers };
57499 return { statusCode, data, headers, trailers };
57500 }
57501 validateReplyParameters(statusCode, data, responseOptions) {
57502 if (typeof statusCode === "undefined") {
57503 throw new InvalidArgumentError("statusCode must be defined");
57504 }
57505 if (typeof data === "undefined") {
57506 throw new InvalidArgumentError("data must be defined");
57507 }
57508 if (typeof responseOptions !== "object") {

Callers 2

replyMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected