Documentation menu

JSON-RPC errors

JSON-RPC errors

Backends use standard JSON-RPC error responses. AHP reserves these server-error codes:

Code Name Meaning
`-32001` `unsupported_protocol_version` Backend does not support `params.protocolVersion`.
`-32002` `unsupported_event` Backend does not support the supplied event type in this method.
`-32003` `backend_unavailable` Backend is temporarily unable to evaluate the request.
`-32004` `backend_internal_error` Backend failed while evaluating the request.
Example: ```json { "jsonrpc": "2.0", "id": "evt_01JQ8Z2Y6YR0H8N7Q2M3X4V5W6", "error": { "code": -32001, "message": "Unsupported AHP protocol version", "data": { "supported": ["draft"] } } } ``` For interception, any JSON-RPC error is an operational failure and is handled using the subscription's failure policy. Discovery errors fail discovery; they do not create a session, an effect, or a subscription decision. Notifications MUST NOT receive JSON-RPC success or error responses. Error `data` MUST NOT contain secrets.