Details
-
Bug
-
Resolution: Works as Designed
-
Major - P3
-
None
-
None
-
None
-
ubuntu 18.04 (server&desktop)
Description
There is a call to find:
cursor, err := s.db.Collection(collectionNotification).Find(ctx, bson.M\{"terminal_id": bson.M{"$in": terminalList}, "status": status})
|
if err != nil {
|
return err
|
}
|
In the case when the documents are not found, the error is not returned.
You have to do an additional check to handle the error.
if !cursor.Next(ctx) {
|
return nil, mongo.ErrNoDocuments
|
}
|