aboutsummaryrefslogtreecommitdiffstats
path: root/rpc
diff options
context:
space:
mode:
authorTaylor Gerring <taylor.gerring@gmail.com>2015-02-25 02:22:08 +0800
committerTaylor Gerring <taylor.gerring@gmail.com>2015-02-25 02:22:08 +0800
commitc8e9abff53d869f74211e157abcb2827d181e106 (patch)
tree52908101f2c9e5184c40c27ca14aa6caf75e1308 /rpc
parent43acad81b3fbee608bf19e6ba32ba27b98d9a7ff (diff)
downloaddexon-c8e9abff53d869f74211e157abcb2827d181e106.tar.gz
dexon-c8e9abff53d869f74211e157abcb2827d181e106.tar.zst
dexon-c8e9abff53d869f74211e157abcb2827d181e106.zip
Remove errParseRequest
Diffstat (limited to 'rpc')
-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
}