[JAVA-4676] Provide access to raw result document when the server returns an error for a command Created: 11/Jul/22  Updated: 28/Oct/23  Resolved: 09/Nov/22

Status: Closed
Project: Java Driver
Component/s: Error Handling
Affects Version/s: None
Fix Version/s: 4.8.0

Type: New Feature Priority: Unknown
Reporter: PM Bot Assignee: Jeffrey Yemin
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Issue split
split from DRIVERS-2385 Provide access to raw result document... Implementing
Quarter: FY23Q3
Upstream Changes Summary:

DRIVERS-2385:
Introduces a new expectedError.errorResponse assertion for matching the full command response attached to an exception. Note that some drivers may need to skip tests for BulkWriteException and WriteException.

Drivers should sync unified tests for Collection Management, CRUD, and Unified Test Runner ("valid") with c04f2ec.

Documentation Changes: Not Needed

 Description   

This ticket was split from DRIVERS-2385, please see that ticket for a detailed description.



 Comments   
Comment by Githook User [ 09/Nov/22 ]

Author:

{'name': 'Jeff Yemin', 'email': 'jeff.yemin@mongodb.com', 'username': 'jyemin'}

Message: Add unified tests for errorResponse

JAVA-4676
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/dfe3d89dd1cb9649462856596ea062d85462dd2f

Comment by Githook User [ 09/Nov/22 ]

Author:

{'name': 'Jeff Yemin', 'email': 'jeff.yemin@mongodb.com', 'username': 'jyemin'}

Message: Update MongoQueryException to extend MongoCommandException

The MongoQueryException class currently extends MongoServerException,
the reason being that prior to MongoDB 3.2 the find helper was implemented
using the OP_QUERY wire protocol message, which is not a command. But now
that 3.6 is the minimum required server version, the find helper is always
implemented via the find command. So MongoQueryException can now extend
MongoCommandException and include the full command response document.

JAVA-4676
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/087576beed02ad234205376d6bc5710190c657a4

Generated at Thu Feb 08 09:02:41 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.