forked from TrueCloudLab/frostfs-node
[#1532] node: Support signature status codes
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
parent
dac4a838fa
commit
1e034c8d48
1 changed files with 4 additions and 1 deletions
|
@ -185,7 +185,10 @@ func (s *SignService) HandleUnaryRequest(ctx context.Context, req interface{}, h
|
||||||
|
|
||||||
// verify request signatures
|
// verify request signatures
|
||||||
if err = signature.VerifyServiceMessage(req); err != nil {
|
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 {
|
} else {
|
||||||
// process request
|
// process request
|
||||||
resp, err = handler(ctx, req)
|
resp, err = handler(ctx, req)
|
||||||
|
|
Loading…
Reference in a new issue