Expand description
KLP error model (SPEC §2.12.9).
KLP carries errors inside the JSON-RPC 2.0 error object, with
the canonical envelope:
{"jsonrpc":"2.0","id":"u5","error":{
"code": -32000,
"message": "Job not user-invokable",
"data": {"kind":"Unauthorized","detail":"manifest 'reboot' has user_invokable=false"}
}}The code field follows JSON-RPC convention (-32700 / -32600
/-32601 / -32602 / -32603 are reserved by the spec; -32000 ..
-32099 are application-defined). data.kind is the canonical
machine-readable label — agents and clients should switch on
kind, not code (a future SPEC bump may reshuffle codes).
Structs§
- RpcError
- JSON-RPC 2.0
errorobject (SPEC §2.12.9). Always paired with a non-nullidinside ansuper::envelope::RpcResponse— there is no notion of an error notification in KLP. - RpcError
Data - Application-side payload inside
RpcError::data.
Enums§
- Error
Kind - All KLP-defined error kinds (SPEC §2.12.9 table).