summaryrefslogtreecommitdiff
path: root/include/modules
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2025-02-20 14:33:40 +0000
committerSadie Powell <sadie@witchery.services>2025-02-20 14:57:22 +0000
commit5420f4858052bd00d86b19380755ed8eec5d2770 (patch)
tree837061a1b8448ccde5c5f6c684b2b8fdba785fac /include/modules
parent5967bf4176dd92b29bb0bd7094755e0dac495e68 (diff)
Use an enum for standard RPC error codes.
Diffstat (limited to 'include/modules')
-rw-r--r--include/modules/rpc.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/modules/rpc.h b/include/modules/rpc.h
index 35db305c7..68523e5fa 100644
--- a/include/modules/rpc.h
+++ b/include/modules/rpc.h
@@ -12,6 +12,19 @@
#include <variant>
+namespace RPC
+{
+ /** Represents standard RPC errors from the JSON-RPC and XML-RPC specifications. */
+ enum Error
+ : int64_t
+ {
+ ERR_PARSE_ERROR = -32700,
+ ERR_INVALID_REQUEST = -32600,
+ ERR_METHOD_NOT_FOUND = -32601,
+ ERR_INVALID_PARAMS = -32602,
+ };
+}
+
class RPCBlock
{
public: