[GODRIVER-1075] Call SingleResult.setRdrContents() in SingleResult.Err() to return correct error Created: 20/May/19 Updated: 28/Oct/23 Resolved: 03/Jun/19 |
|
| Status: | Closed |
| Project: | Go Driver |
| Component/s: | CRUD |
| Affects Version/s: | None |
| Fix Version/s: | 1.1.0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Ian Whalen (Inactive) | Assignee: | Emmanuel Eppinger (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | neweng | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
The SingleResult type should have a HasResult method to check if there actually was a result. This can internally use setRdrContents and check the value of the rdr member. |
| Comments |
| Comment by Githook User [ 03/Jun/19 ] |
|
Author: {'name': 'Emmanuel', 'email': 'manny.eppinger@mongodb.com', 'username': 'eppingere'}Message: Change SingleResult.Err() to call setRdrContents() Change-Id: I810437125ae65c1e89f95f102b9cae4d2e2e82a2 |
| Comment by Emmanuel Eppinger (Inactive) [ 31/May/19 ] |
|
Done! |
| Comment by Divjot Arora (Inactive) [ 31/May/19 ] |
|
Per offline discussion: ErrNoDocuments is more of an informative error and should be returned by SingleResult.Err. The work for this ticket will be to change SingleResult.Err to call setRdrContents so it can return the correct error. |
| Comment by Emmanuel Eppinger (Inactive) [ 31/May/19 ] |
|
https://review.gerrithub.io/c/mongodb/mongo-go-driver/+/456506
|