Skip to content

Commit

Permalink
[#1532] node: Support signature status codes
Browse files Browse the repository at this point in the history
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
  • Loading branch information
carpawell committed Jul 12, 2022
1 parent dac4a83 commit 1e034c8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/services/util/sign.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 1e034c8

Please sign in to comment.