aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--rpc/http/server.go2
-rw-r--r--rpc/messages.go1
-rw-r--r--rpc/ws/server.go2
3 files changed, 2 insertions, 3 deletions
diff --git a/rpc/http/server.go b/rpc/http/server.go
index dd6ba68e3..fa66eed48 100644
--- a/rpc/http/server.go
+++ b/rpc/http/server.go
@@ -92,7 +92,7 @@ func (s *RpcHttpServer) apiHandler(api *rpc.EthereumApi) http.Handler {
reqParsed, reqerr := JSON.ParseRequestBody(req)
if reqerr != nil {
- jsonerr := &rpc.RpcErrorObject{-32700, rpc.ErrorParseRequest}
+ jsonerr := &rpc.RpcErrorObject{-32700, "Error: Could not parse request"}
JSON.Send(w, &rpc.RpcErrorResponse{JsonRpc: jsonrpcver, ID: nil, Error: jsonerr})
return
}
diff --git a/rpc/messages.go b/rpc/messages.go
index 18fbec931..044f07545 100644
--- a/rpc/messages.go
+++ b/rpc/messages.go
@@ -29,7 +29,6 @@ var (
errArguments = errors.New("Error: Insufficient arguments")
errNotImplemented = errors.New("Error: Method not implemented")
errUnknown = errors.New("Error: Unknown error")
- errParseRequest = errors.New("Error: Could not parse request")
errDecodeArgs = errors.New("Error: Could not decode arguments")
)
diff --git a/rpc/ws/server.go b/rpc/ws/server.go
index b8cc2fa6b..2c2988f5d 100644
--- a/rpc/ws/server.go
+++ b/rpc/ws/server.go
@@ -99,7 +99,7 @@ func sockHandler(api *rpc.EthereumApi) websocket.Handler {
// reqParsed, reqerr := JSON.ParseRequestBody(conn.Request())
if err := websocket.JSON.Receive(conn, &reqParsed); err != nil {
- jsonerr := &rpc.RpcErrorObject{-32700, rpc.ErrorParseRequest}
+ jsonerr := &rpc.RpcErrorObject{-32700, "Error: Could not parse request"}
JSON.Send(conn, &rpc.RpcErrorResponse{JsonRpc: jsonrpcver, ID: nil, Error: jsonerr})
continue
}