[GODRIVER-1784] Export extractError function Created: 09/Nov/20  Updated: 31/Mar/21  Resolved: 31/Mar/21

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

Type: Improvement Priority: Major - P3
Reporter: Divjot Arora (Inactive) Assignee: Benji Rewis (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Documentation Changes: Not Needed

 Description   

The extractError function in x/mongo/driver/errors.go converts a server response document into one of our low-level error types, which can then be fed directly into ProcessError to do SDAM error handling. This isn't required for correctness, but exporting this function would make it easier to do this in projects that depend on our low-level APIs.



 Comments   
Comment by Githook User [ 31/Mar/21 ]

Author:

{'name': 'Benjamin Rewis', 'email': '32186188+benjirewis@users.noreply.github.com', 'username': 'benjirewis'}

Message: Ensure writeErrors field is ignored in SDAM errors

GODRIVER-1859 Add ignore writeErrors SDAM spec test
GODRIVER-1784 Export extractError to ExtractErrorFromServerResponse
Branch: master
https://github.com/mongodb/mongo-go-driver/commit/1c4c5884b8363a83036e50a209dcec5b3ddf4f25

Comment by Benji Rewis (Inactive) [ 25/Mar/21 ]

In review in the same PR as GODRIVER-1859

https://github.com/mongodb/mongo-go-driver/pull/621

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