ErrorResponse shape.
Status and code reference
If you branch on HTTP status alone, add a check for the
error field too. not_found and not_implemented both come back as 200.
Example: a route that is not implemented yet
curl
Response
MCP errors take a different shape
REST always answers the shape at the top of this page. MCP tool failures surface as a JSON-RPC error object on thetools/call response instead, since MCP is a JSON-RPC protocol.
message field carries the same reason a REST message would. It sits inside JSON-RPC’s own error envelope instead: -32602 for a malformed call or an unknown tool name, -32603 for a validation or upstream failure once the tool starts running.
A validation error never costs you anything, on either transport. It happens before any provider call, so no Monid run is made and nothing is written to the cost ledger.