MCPcopy
hub / github.com/MiniMax-AI/cli / errorResponse

Function errorResponse

test/auth/oauth.test.ts:64–72  ·  view source on GitHub ↗
(status: number, body?: string)

Source from the content-addressed store, hash-verified

62}
63
64function errorResponse(status: number, body?: string) {
65 return {
66 status,
67 ok: false,
68 headers: new Headers({ 'Content-Type': 'application/json' }),
69 text: async () => body || '{}',
70 json: async () => JSON.parse(body || '{}'),
71 } as Response;
72}
73
74/**
75 * Convenience: create a two-phase mock (device/code → token polling).

Callers 1

oauth.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected