MCPcopy Index your code
hub / github.com/microsoft/TypeChat / makeErrorResponse

Function makeErrorResponse

typescript/tests/model.test.mjs:52–64  ·  view source on GitHub ↗
(status, statusText, retryAfterSec = null)

Source from the content-addressed store, hash-verified

50}
51
52function makeErrorResponse(status, statusText, retryAfterSec = null) {
53 return {
54 ok: false,
55 status,
56 statusText,
57 headers: {
58 get: (name) =>
59 name.toLowerCase() === "retry-after" && retryAfterSec !== null
60 ? String(retryAfterSec)
61 : null,
62 },
63 };
64}
65
66// ---------------------------------------------------------------------------
67// Mock fetch utility

Callers 1

model.test.mjsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected