diff options
Diffstat (limited to 'rpc/server.go')
-rw-r--r-- | rpc/server.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rpc/server.go b/rpc/server.go index 1bb15d5..9c5e847 100644 --- a/rpc/server.go +++ b/rpc/server.go @@ -114,7 +114,7 @@ func (r *RpcServer) callMethod(ctx context.Context, req *rpcRequest) *rpcRespons if !ok { return &rpcResponse{ Jsonrpc: version, - Error: NewError(ErrCodeMethodNotFound), + Error: ErrorFromCode(ErrCodeMethodNotFound), Id: req.Id, } } @@ -137,7 +137,7 @@ func (r *RpcServer) callMethod(ctx context.Context, req *rpcRequest) *rpcRespons func WriteError(code int, enc *json.Encoder) { enc.Encode(rpcResponse{ Jsonrpc: version, - Error: NewError(code), + Error: ErrorFromCode(code), }) } |