[#1532] node: Support signature status codes

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
Pavel Karpy 2022-06-16 23:57:09 +03:00 committed by Pavel Karpy
parent dac4a838fa
commit 1e034c8d48

View file

@ -185,7 +185,10 @@ func (s *SignService) HandleUnaryRequest(ctx context.Context, req interface{}, h
// verify request signatures
if err = signature.VerifyServiceMessage(req); err != nil {
err = fmt.Errorf("could not verify request: %w", err)
var sigErr apistatus.SignatureVerification
sigErr.SetMessage(err.Error())
err = sigErr
} else {
// process request
resp, err = handler(ctx, req)