MCPcopy Create free account
hub / github.com/acoyfellow/cloudbox / jsonErrorResponse

Function jsonErrorResponse

src/http-errors.ts:5–10  ·  view source on GitHub ↗
(status: number, code: string, detail: string)

Source from the content-addressed store, hash-verified

3}
4
5export function jsonErrorResponse(status: number, code: string, detail: string): Response {
6 return new Response(JSON.stringify({ error: code, detail }), {
7 status,
8 headers: { "content-type": "application/json; charset=utf-8" },
9 });
10}

Callers 7

authorizeFunction · 0.90
authorizeActionFunction · 0.90
validateSpecFunction · 0.90
validateRunFunction · 0.90
requireLiveRunFunction · 0.90
requireRunnableLiveRunFunction · 0.90
internalComputerOwnerFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected