Explorer

definy.mcp-error

description
The JSON-RPC error response
type
Fn(status: Number, id: @definy.json, code: Number, message: String) -> @definy.service-io
expression
fn(status$0, id$1, code$2, message$3) =>
  @definy.json-response(
    status: $0,
    body: #object<@definy.json>([
      {key: "jsonrpc", value: #string<@definy.json>("2.0")},
      {key: "id", value: $1},
      {
        key: "error",
        value: #object<@definy.json>([
          {key: "code", value: #number<@definy.json>($2)},
          {key: "message", value: #string<@definy.json>($3)}
        ])
      }
    ])
  )
visibility
public
definy.mcp-error (project definy, branch main, snapshot l0VFjJZP174d8CbZWFoujAGTYjgsQu4uTq5uWCZaXgo)
id: KxVqzDKXSnmKh4_-KavfHRcLXNSiHOywmGKdovcRrZU
content hash: xCWLz84eIX3S44EFofwnV7Cwlj6WV9BYhwfKt2_5B3A