[GODRIVER-3048] HasErrorCode() should parse MultipleErrorsOccurred’s `errInfo`. Created: 10/Nov/23 Updated: 06/Feb/24 |
|
| Status: | Blocked |
| Project: | Go Driver |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Felipe Gasper | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 1 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||
| Quarter: | FY24Q1 | ||||||||||||||||||||
| Documentation Changes Summary: | 1. What would you like to communicate to the user about this feature? |
||||||||||||||||||||
| Description |
| Comments |
| Comment by Preston Vasquez [ 14/Nov/23 ] | ||
|
felipe.gasper@mongodb.com Yes, I believe it is accurately documented. From the documentation:
I would expect one of two error codes to indicate a MultipleErrorsOccured error: 65 or 40671. See here for the rationale on the latter. In these cases to get more information you can inspect the Raw value. This is not a bug, as the driver's specifications explicitly state not to do this:
The argument for why can be found here:
I've created DRIVERS-2775 to argue loosening this condition to allow us to implement this improvement. Thank you for bringing this to our attention | ||
| Comment by Felipe Gasper [ 14/Nov/23 ] | ||
|
preston.vasquez@mongodb.com We could work around this by manually inspecting the response, yes. But in that case, is HasErrorCode() accurately named and documented, if it only indicates the presence of an error code depending on how the server sent that error code? | ||
| Comment by Preston Vasquez [ 13/Nov/23 ] | ||
|
felipe.gasper@mongodb.com Would you mind expanding on the use case of this and what the current behavior is? I think the server specifically sends error code 65 which comes with the extra information encapsulated in MultipleErrorsOccurredInfo. Can the mongosync team use the "Raw" value on the command error to get this extra info? From the comment on that extra info type:
|