MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / jsonError

Function jsonError

apps/local/src/mcp.ts:61–62  ·  view source on GitHub ↗
(status: number, code: number, message: string)

Source from the content-addressed store, hash-verified

59// INNER responses (no CORS) — byte-identical to the prior hand-rolled copy
60// (`content-type: application/json` only) via the canonical renderer.
61const jsonError = (status: number, code: number, message: string): Response =>
62 jsonRpcErrorBody(status, code, message, { cors: false });
63
64const formatBoundaryError = (error: unknown): unknown => {
65 // oxlint-disable-next-line executor/no-instanceof-error, executor/no-unknown-error-message -- boundary: MCP request handler catches unknown SDK/runtime failures for process logging

Callers 1

createMcpRequestHandlerFunction · 0.85

Calls 1

jsonRpcErrorBodyFunction · 0.85

Tested by

no test coverage detected