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

Function jsonError

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

Source from the content-addressed store, hash-verified

60// INNER responses (no CORS) — byte-identical to the prior hand-rolled copy
61// (`content-type: application/json` only) via the canonical renderer.
62const jsonError = (status: number, code: number, message: string): Response =>
63 jsonRpcErrorBody(status, code, message, { cors: false });
64
65const formatBoundaryError = (error: unknown): unknown => {
66 // 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