[GODRIVER-2039] Implement error helpers for generic errors Created: 08/Jun/21 Updated: 11/Jun/21 Resolved: 11/Jun/21 |
|
| Status: | Closed |
| Project: | Go Driver |
| Component/s: | Error Handling |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Minor - P4 |
| Reporter: | Benji Rewis (Inactive) | Assignee: | Unassigned |
| Resolution: | Won't Do | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Description |
|
Implement generic error helpers in mongo/errors.go: HasErrorMessage, HasErrorCode and HasErrorLabels. These functions should take a generic error and try to access Message, Code and Labels fields if they exist. |