[GODRIVER-3086] Add a method to ServerError that returns all error codes. Created: 04/Jan/24  Updated: 06/Feb/24

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

Type: New Feature Priority: Unknown
Reporter: Felipe Gasper Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on GODRIVER-3048 HasErrorCode() should parse MultipleE... Blocked
Related
is related to GODRIVER-3048 HasErrorCode() should parse MultipleE... Blocked
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   

We frequently need to detect not merely whether a given error code exists in a server error, but whether any other errors of concern have happened. To do this it would be good to have a way to gather all error codes from an error. The driver provides HasErrorCode(), but that only checks for a specific, given error code; it won't tell me what other codes the error may contain.

Right now we've got our own function to do this, but this seems like the kind of thing that the driver would more usefully provide—not the least because it's unclear from the documentation whether there are other types of server errors that we're not checking.

It might be useful to consider this in tandem with GODRIVER-3048, which proposes additional parsing of MultipleErrorsOccurred errors.


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