[GODRIVER-1791] Return ErrNoDocuments more consistently Created: 13/Nov/20  Updated: 11/Sep/23  Resolved: 11/Sep/23

Status: Closed
Project: Go Driver
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Isabella Siu (Inactive) Assignee: Unassigned
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Documentation Changes Summary:

1. What would you like to communicate to the user about this feature?
2. Would you like the user to see examples of the syntax and/or executable code and its output?
3. Which versions of the driver/connector does this apply to?


 Description   

Make the Delete, Replace, and Update commands return ErrNoDocuments when no document is found, like the FindOne, FindOneAndUpdate, FindOneAndReplace, and FindOneAndDelete helpers do.



 Comments   
Comment by Matt Dale [ 08/Sep/23 ]

Returning a ErrNoDocuments error behavior specific to the SingleResult type and all functions that return it. It's not shared by any other read or write CRUD APIs right now. I think returning it from more CRUD methods would break existing users' expectations and not add any clarity for new users.

Triage question: Should we close this?

Generated at Thu Feb 08 08:37:08 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.