[GODRIVER-312] Ensure WriteErrors are returned to the user Created: 26/Mar/18 Updated: 27/Apr/18 Resolved: 27/Apr/18 |
|
| Status: | Closed |
| Project: | Go Driver |
| Component/s: | CRUD |
| Affects Version/s: | 0.0.2 |
| Fix Version/s: | 0.0.4 |
| Type: | New Feature | Priority: | Major - P3 |
| Reporter: | Kristofer Brandow (Inactive) | Assignee: | Kristofer Brandow (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | FreeMonitoring, Stitch, evg | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Epic Link: | GODRIVER Alpha UX | ||||||||||||||||
| Description |
|
The current OP_REPLY error parsing code does not account for circumstances where the errmsg, codeName, or code are nested within the response document. This means that for write commands (insert, update, and delete), additional error parsing logic is require to extract the writeErrors. To fix this problem:
|
| Comments |
| Comment by Kristofer Brandow (Inactive) [ 27/Apr/18 ] |
|
Code Review: https://review.gerrithub.io/c/mongodb/mongo-go-driver/+/408527. |
| Comment by Githook User [ 27/Apr/18 ] |
|
Author: {'email': 'kris@mongodb.com', 'username': 'skriptble', 'name': 'Kris Brandow'}Message: Ensure write operation error are returned
Change-Id: Ib3321215285029b9602f27ca4a89d588ef643238 |
| Comment by Jeffrey Yemin [ 23/Apr/18 ] |
|
For reference, here's the exception thrown by the C# driver: https://github.com/mongodb/mongo-csharp-driver/blob/master/src/MongoDB.Driver/MongoBulkWriteException.cs |
| Comment by Eric Daniels (Inactive) [ 23/Apr/18 ] |
|
Not sure. May be best to format it as an array of a series of errors. |
| Comment by Kristofer Brandow (Inactive) [ 23/Apr/18 ] |
|
eric.daniels Yes, but I'm not sure how we should actually stringify the multi-error. |
| Comment by Eric Daniels (Inactive) [ 20/Apr/18 ] |
|
Will this also handle multiple errors returned from InsertMany for instance? |