[CDRIVER-3661] Documented differences between error API v1 and API v2 are incomplete Created: 08/May/20 Updated: 27/Oct/23 Resolved: 12/May/23 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | docs |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Minor - P4 |
| Reporter: | Kevin Albertson | Assignee: | Unassigned |
| Resolution: | Works as Designed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Quarter: | FY24Q2 |
| Description |
|
The Error Reporting page documents the differences between error API V1 and V2, including a table of the error domain in V1 and corresponding error domain in V2. The paragraph says:
But the table does not have an entry for MONGOC_ERROR_COLLECTION. I think that is either missing, or the row for mongoc_collection_insert_one() and the other collection write functions is incorrectly documented. |
| Comments |
| Comment by Kevin Albertson [ 12/May/23 ] |
|
The MONGOC_ERROR_COLLECTION appears to only be returned for client-side errors. The only found instance of returning MONGOC_ERROR_COLLECTION is in [_empty_error](https://github.com/mongodb/mongo-c-driver/blob/69caa27f216f59d116f3dd6e64584f746820d7b4/src/libmongoc/src/mongoc/mongoc-write-command.c#L362-L374) which is only called for a client-side check of a non-empty payload length before sending a write command. The documentation appears to be correct. Closing as "Works as Designed". |