[GODRIVER-1813] Expose code in error message Created: 22/Dec/20  Updated: 30/Mar/22

Status: Backlog
Project: Go Driver
Component/s: Error Handling
Affects Version/s: 1.4.4
Fix Version/s: None

Type: New Feature Priority: Major - P3
Reporter: Pierre Durand Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related

 Description   

Currently the `.Error()` methods simply return the content of the `Message` fields. It's not possible to see what is the error code from the error message returned by `.Error()`.

Yes I know I can inspect the `WriteError` object, but I think it would be more user friendly to expose the code in the human readable error message returned by `Error()`.

I think the other drivers (Nodejs or PHP) are already printing the error code. 



 Comments   
Comment by Kevin Albertson [ 22/Dec/20 ]

Hi pierrre, thank you for the feature request! I can see how it would be helpful for diagnostics and usability to include the error codes as part of the error messages. The team will look into this soon and decide if and how to schedule this work.

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