collection.findOne with projection option return error

Maybe you need to add some $ifNull: clause to your projection, if that’s possible in Swift.