[GODRIVER-2042] Returning errInfo - Schema Validation Created: 10/Jun/21  Updated: 14/Jun/21  Resolved: 14/Jun/21

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

Type: Task Priority: Unknown
Reporter: Vinnicyus Gracindo Assignee: Matt Dale
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
backported by SERVER-20547 Expose the reason an operation fails ... Closed
Duplicate
duplicates GODRIVER-1867 Expose the Reason an Operation Fails ... Closed

 Description   

Version 5 of mongodb resolved the issue SERVER-20547. Now the MongoDb server is able to return unvalidated fields in a schema. The information comes via the “errInfo” variable, but mongo-go-driver only returns the “errmsg”.

I think “errInfo” can be returned by modifying the ExtractErrorFromServerResponse function. Am I right? Any tips on how best to do this and submit as a pull request?

Thank you.



 Comments   
Comment by Matt Dale [ 14/Jun/21 ]

vini.gracindo@gmail.com thanks for the report!

You're correct, as of MongoDB server v5.0, the server returns schema validation failure information via the errInfo field on error responses. The change to support that new error field in the Go driver is actually in-progress as part of GODRIVER-1867. I'm going to mark this ticket as a duplicate of GODRIVER-1867.

Please watch GODRIVER-1867 for updates.

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