MCPcopy Index your code
hub / github.com/callstack/agent-device / createRpcError

Function createRpcError

src/daemon/server/http-server.ts:104–115  ·  view source on GitHub ↗
(
  id: JsonRpcId,
  code: number,
  message: string,
  data?: Record<string, unknown>,
)

Source from the content-addressed store, hash-verified

102]);
103
104function createRpcError(
105 id: JsonRpcId,
106 code: number,
107 message: string,
108 data?: Record<string, unknown>,
109): JsonRpcResponse {
110 return {
111 jsonrpc: '2.0',
112 id,
113 error: { code, message, data },
114 };
115}
116
117function sendJson(
118 res: http.ServerResponse<http.IncomingMessage>,

Callers 2

runHttpAuthHookFunction · 0.85
createDaemonHttpServerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected