Commit c8e9abff authored by Taylor Gerring's avatar Taylor Gerring

Remove errParseRequest

parent 43acad81
...@@ -92,7 +92,7 @@ func (s *RpcHttpServer) apiHandler(api *rpc.EthereumApi) http.Handler { ...@@ -92,7 +92,7 @@ func (s *RpcHttpServer) apiHandler(api *rpc.EthereumApi) http.Handler {
reqParsed, reqerr := JSON.ParseRequestBody(req) reqParsed, reqerr := JSON.ParseRequestBody(req)
if reqerr != nil { 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}) JSON.Send(w, &rpc.RpcErrorResponse{JsonRpc: jsonrpcver, ID: nil, Error: jsonerr})
return return
} }
......
...@@ -29,7 +29,6 @@ var ( ...@@ -29,7 +29,6 @@ var (
errArguments = errors.New("Error: Insufficient arguments") errArguments = errors.New("Error: Insufficient arguments")
errNotImplemented = errors.New("Error: Method not implemented") errNotImplemented = errors.New("Error: Method not implemented")
errUnknown = errors.New("Error: Unknown error") errUnknown = errors.New("Error: Unknown error")
errParseRequest = errors.New("Error: Could not parse request")
errDecodeArgs = errors.New("Error: Could not decode arguments") errDecodeArgs = errors.New("Error: Could not decode arguments")
) )
......
...@@ -99,7 +99,7 @@ func sockHandler(api *rpc.EthereumApi) websocket.Handler { ...@@ -99,7 +99,7 @@ func sockHandler(api *rpc.EthereumApi) websocket.Handler {
// reqParsed, reqerr := JSON.ParseRequestBody(conn.Request()) // reqParsed, reqerr := JSON.ParseRequestBody(conn.Request())
if err := websocket.JSON.Receive(conn, &reqParsed); err != nil { 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}) JSON.Send(conn, &rpc.RpcErrorResponse{JsonRpc: jsonrpcver, ID: nil, Error: jsonerr})
continue continue
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment