diff --git a/goextVersion.go b/goextVersion.go index 4fceb0f..f441fb7 100644 --- a/goextVersion.go +++ b/goextVersion.go @@ -1,5 +1,5 @@ package goext -const GoextVersion = "0.0.318" +const GoextVersion = "0.0.319" -const GoextVersionTimestamp = "2023-11-13T15:34:58+0100" +const GoextVersionTimestamp = "2023-11-13T16:45:00+0100" diff --git a/wmo/queryFindOne.go b/wmo/queryFindOne.go index 25208f6..acd43a1 100644 --- a/wmo/queryFindOne.go +++ b/wmo/queryFindOne.go @@ -81,13 +81,13 @@ func (c *Coll[TData]) findOneInternal(ctx context.Context, filter bson.M, allowN if cursor.Next(ctx) { v, err := c.decodeSingle(ctx, cursor) if err != nil { - return nil, exerr.Wrap(err, "mongo-aggregation [find-one] failed").Any("pipeline", pipeline).Str("collection", c.Name()).Build() + return nil, exerr.Wrap(err, "mongo-aggregation [find-one] failed to decode results").Any("pipeline", pipeline).Str("collection", c.Name()).Build() } return &v, nil } else if allowNull { return nil, nil } else { - return nil, exerr.Wrap(err, "mongo-aggregation [find-one] failed").Any("pipeline", pipeline).Str("collection", c.Name()).Build() + return nil, exerr.Wrap(mongo.ErrNoDocuments, "mongo-aggregation [find-one] returned no documents").Any("pipeline", pipeline).Str("collection", c.Name()).Build() } } }