mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
better error message
This commit is contained in:
parent
7c770b727c
commit
ecaa30c408
|
@ -109,6 +109,10 @@ func (store *MongodbStore) InsertEntry(ctx context.Context, entry *filer.Entry)
|
|||
Meta: meta,
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
return fmt.Errorf("InsertEntry %st: %v", entry.FullPath, err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -124,6 +128,7 @@ func (store *MongodbStore) FindEntry(ctx context.Context, fullpath util.FullPath
|
|||
var where = bson.M{"directory": dir, "name": name}
|
||||
err = store.connect.Database(store.database).Collection(store.collectionName).FindOne(ctx, where).Decode(&data)
|
||||
if err != mongo.ErrNoDocuments && err != nil {
|
||||
glog.Error("find %s: %v", fullpath, err)
|
||||
return nil, filer_pb.ErrNotFound
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue