[#348] Wrap errors from buildSessionTokens func

Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
This commit is contained in:
Angira Kekteeva 2022-02-16 22:26:51 +03:00 committed by Kirillov Denis
parent ee6c582ec8
commit aa4c9d19f6

View file

@ -480,7 +480,7 @@ func createTokens(options *IssueSecretOptions, lifetime lifetimeOptions, cid *ci
oid := owner.NewIDFromPublicKey(&options.NeoFSKey.PrivateKey.PublicKey)
sessionTokens, err := buildSessionTokens(options.NeoFSKey, oid, lifetime, sessionRules, options.GatesPublicKeys)
if err != nil {
return nil, err
return nil, fmt.Errorf("failed to biuild session token: %w", err)
}
for i, sessionTkns := range sessionTokens {
gates[i].SessionTokens = sessionTkns