From 7b1943a6e57d97d5607c7a78ab6ec80e5a09de8e Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Fri, 6 May 2022 10:07:34 +0300 Subject: [PATCH] rpc/server: return original error for invoke* param errors --- pkg/rpc/server/server.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/rpc/server/server.go b/pkg/rpc/server/server.go index e370fb8f4..22c1eab8b 100644 --- a/pkg/rpc/server/server.go +++ b/pkg/rpc/server/server.go @@ -1675,7 +1675,7 @@ func (s *Server) getInvokeScriptParams(reqParams request.Params) (*transaction.T if len(reqParams) > 1 { signers, witnesses, err := reqParams[1].GetSignersWithWitnesses() if err != nil { - return nil, false, response.ErrInvalidParams + return nil, false, response.WrapErrorWithData(response.ErrInvalidParams, err) } tx.Signers = signers tx.Scripts = witnesses @@ -1684,7 +1684,7 @@ func (s *Server) getInvokeScriptParams(reqParams request.Params) (*transaction.T if len(reqParams) > 2 { verbose, err = reqParams[2].GetBoolean() if err != nil { - return nil, false, response.ErrInvalidParams + return nil, false, response.WrapErrorWithData(response.ErrInvalidParams, err) } } if len(tx.Signers) == 0 {