[CXX-1646] Include server replies in all exceptions where possible Created: 07/Sep/18  Updated: 01/Feb/23  Resolved: 20/Apr/21

Status: Closed
Project: C++ Driver
Component/s: Implementation
Affects Version/s: 3.3.1
Fix Version/s: 3.7.0, 3.7.0-beta1

Type: Task Priority: Minor - P4
Reporter: Kevin Albertson Assignee: Benji Rewis (Inactive)
Resolution: Done Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Epic Link: CXX usability improvements
Quarter: FY24Q3

 Description   

Some exceptions omit a server reply. E.g. one found while implementing transaction spec tests:

https://github.com/mongodb/mongo-cxx-driver/blob/r3.3.1/src/mongocxx/cursor.cpp#L55

Should instead use mongoc_cursor_error_document and include the reply document if one is returned.

From scanning through it looks like there might be more cases throwing that are not including the server reply in the exception. We should audit all such cases and add the reply where possible.



 Comments   
Comment by Githook User [ 20/Apr/21 ]

Author:

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

Message: CXX-1646 Include server replies in all exceptions (#782)
Branch: master
https://github.com/mongodb/mongo-cxx-driver/commit/643e2b13f833401ff0ffa35762b835e586c11686

Comment by Benji Rewis (Inactive) [ 14/Apr/21 ]

https://github.com/mongodb/mongo-cxx-driver/pull/782

Generated at Wed Feb 07 22:03:26 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.