[#125] Updated error handling

Signed-off-by: Denis Kirillov <denis@nspcc.ru>
This commit is contained in:
Denis Kirillov 2021-07-09 11:57:44 +03:00
parent e11b1b76ba
commit e78543adf3
4 changed files with 13 additions and 13 deletions

View file

@ -5,6 +5,7 @@ import (
"crypto/ecdsa"
"fmt"
"strconv"
"strings"
"time"
"github.com/nspcc-dev/neo-go/pkg/crypto/keys"
@ -58,6 +59,9 @@ func (n *layer) containerInfo(ctx context.Context, cid *cid.ID) (*BucketInfo, er
zap.String("request_id", rid),
zap.Error(err))
if strings.Contains(err.Error(), "container not found") {
return nil, ErrBucketNotFound
}
return nil, err
}