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

Function renderDispatchError

packages/hosts/mcp/src/envelope.ts:194–197  ·  view source on GitHub ↗
(lookup: "not-found" | "forbidden")

Source from the content-addressed store, hash-verified

192
193/** Render a non-`Response` {@link McpDispatchResult} discriminant. */
194const renderDispatchError = (lookup: "not-found" | "forbidden"): Response =>
195 lookup === "not-found"
196 ? jsonRpcResponse(404, -32001, "Session not found")
197 : jsonRpcResponse(403, -32003, "MCP session does not belong to the current bearer");
198
199/** Dispatch an MCP request through authenticate -> store.dispatch -> transport. */
200const mcpDispatch = (resource: McpResource) =>

Callers 1

mcpDispatchFunction · 0.85

Calls 1

jsonRpcResponseFunction · 0.70

Tested by

no test coverage detected