jsonRpcErrorResponse
Function: jsonRpcErrorResponse()
jsonRpcErrorResponse(
ctx,status,error,id?,headers?):void
Defined in: packages/mcp/src/bridge.ts:85
Answer with a JSON-RPC error body carrying data, a request id and extra headers
Parameters
ctx
WebContext
the request context
status
number
HTTP status
error
JSON-RPC error
code
number
JSON-RPC error code
data?
unknown
error data
message
string
error message
id?
string | number | null = null
id of the request answered
headers?
Record<string, string> = {}
extra response headers
Returns
void