Expand description
Stable JSON-RPC error codes.
§Contract
Once a variant is assigned a numeric value, that value never changes.
New variants append to the enum at the next unused integer. The enum is
#[non_exhaustive] so clients built against an older version don’t
panic on a newer server’s new code.
§Ranges
-32768..=-32000— reserved by JSON-RPC 2.0. We use the spec-defined pre-defined values (ParseError,InvalidRequest,MethodNotFound,InvalidParams,InternalError).10000..— DIG-reserved. Sub-allocated by concern:10001..=10009— sync / auth / permission10010..=10019— cryptographic checks10020..=10029— L1 (Chia) issues10030..=10039— wallet state10040..=10049— lifecycle10050..=10059— protocol / version
§References
- JSON-RPC 2.0 spec §5.1
- serde_repr — the crate providing the
Serialize_repr/Deserialize_reprderive macros used here.
Enums§
- Error
Code - Stable JSON-RPC error code.