aboutsummaryrefslogtreecommitdiff
path: root/rpc/errors.go
diff options
context:
space:
mode:
authorAlexander Kiryukhin <a.kiryukhin@mail.ru>2022-05-28 16:53:20 +0300
committerAlexander Kiryukhin <a.kiryukhin@mail.ru>2022-05-28 16:53:20 +0300
commitf304a07a8cfe67b2a65f95f27eb10a9b854c4ef8 (patch)
tree9e6a7e9ea6b8d600cccac5a5d50f3232d631d073 /rpc/errors.go
parent281eda83c9f4bcb06318444df3574df0840205fa (diff)
Improved middlewares
Diffstat (limited to 'rpc/errors.go')
-rw-r--r--rpc/errors.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/rpc/errors.go b/rpc/errors.go
index 71a7168..f6d2f49 100644
--- a/rpc/errors.go
+++ b/rpc/errors.go
@@ -31,12 +31,12 @@ const (
)
var errorMap = map[int]string{
- -32700: "Parse error", // Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text.
- -32600: "Invalid Request", // The JSON sent is not a valid Request object.
- -32601: "Method not found", // The method does not exist / is not available.
- -32602: "Invalid params", // Invalid method parameter(s).
- -32603: "Internal error", // Internal JSON-RPC error.
- -32000: "Other error",
+ ErrCodeParseError: "Parse error", // Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text.
+ ErrCodeInvalidRequest: "Invalid Request", // The JSON sent is not a valid Request object.
+ ErrCodeMethodNotFound: "Method not found", // The method does not exist / is not available.
+ ErrCodeInvalidParams: "Invalid params", // Invalid method parameter(s).
+ ErrCodeInternalError: "Internal error", // Internal JSON-RPC error.
+ ErrUser: "Other error",
}
//-32000 to -32099 RpcServer error Reserved for implementation-defined server-errors.