Skip to main content
HTTP status is 200 for every dispatched call. Distinguish outcomes by response shape.

Error shape

{
  "jsonrpc": "2.0",
  "id": 1,
  "error": {
    "code": 500,
    "message": "<service error message>"
  }
}
The message is the real error string from the backend. The code distinguishes protocol errors from runtime failures:
CodeMeaning
-32700Parse error (invalid JSON)
-32600Invalid request (no method specified)
-32601Unknown or unavailable method
-32602Invalid params (named parameters required)
-32603Internal JSON-RPC error (defined by the dispatcher, rarely emitted)
500Service or internal error
403Authorization denied
These codes are part of the generated contract: JsonRpcError.code in the OpenAPI reference carries the same enum, regenerated from the backend facade XML (./gradlew :runtime:component:darpan:generateApiContract).

Business validation

Facade business validation does not use the error object. It returns a success envelope with result.ok: false and the failures in result.errors[]. Treat ok: false as a failed call even though no error object is present.