[#8] Check error after setting gate's auth keys

Signed-off-by: Pavel Korotkov <pkorotkov@gmail.com>
This commit is contained in:
Pavel Korotkov 2020-08-06 20:19:30 +03:00
parent 1e608634e7
commit c5489da3cc

View file

@ -118,9 +118,11 @@ func fetchAuthCenter(l *zap.Logger, v *viper.Viper, peers []pool.Peer) (*auth.Ce
if err != nil {
return nil, errors.Wrap(err, "failed to create auth center")
}
center.SetUserAuthKeys(gateAuthPrivateKey)
if err = center.SetUserAuthKeys(gateAuthPrivateKey); err != nil {
return nil, errors.Wrap(err, "failed to set gate auth keys")
}
if err = center.SetNeoFSKeys(neofsPrivateKey); err != nil {
return nil, err
return nil, errors.Wrap(err, "failed to set NeoFS keys")
}
return center, nil
}