From c5489da3ccc1de414851a2ad274fb46da5f9f2c4 Mon Sep 17 00:00:00 2001 From: Pavel Korotkov Date: Thu, 6 Aug 2020 20:19:30 +0300 Subject: [PATCH] [#8] Check error after setting gate's auth keys Signed-off-by: Pavel Korotkov --- cmd/gate/app-settings.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cmd/gate/app-settings.go b/cmd/gate/app-settings.go index 086940a..6952225 100644 --- a/cmd/gate/app-settings.go +++ b/cmd/gate/app-settings.go @@ -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 }