diff options
author | Alexander Kiryukhin <a.kiryukhin@mail.ru> | 2022-05-28 16:53:20 +0300 |
---|---|---|
committer | Alexander Kiryukhin <a.kiryukhin@mail.ru> | 2022-05-28 16:53:20 +0300 |
commit | f304a07a8cfe67b2a65f95f27eb10a9b854c4ef8 (patch) | |
tree | 9e6a7e9ea6b8d600cccac5a5d50f3232d631d073 /rpc/errors.go | |
parent | 281eda83c9f4bcb06318444df3574df0840205fa (diff) |
Improved middlewares
Diffstat (limited to 'rpc/errors.go')
-rw-r--r-- | rpc/errors.go | 12 |
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. |