From f304a07a8cfe67b2a65f95f27eb10a9b854c4ef8 Mon Sep 17 00:00:00 2001 From: Alexander Kiryukhin Date: Sat, 28 May 2022 16:53:20 +0300 Subject: Improved middlewares --- rpc/errors.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'rpc/errors.go') 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. -- cgit v1.2.3