[CSHARP-2294] Add ErrorLabels property to MongoException Created: 08/Jun/18  Updated: 28/Oct/23  Resolved: 10/Jun/18

Status: Closed
Project: C# Driver
Component/s: Error Handling
Affects Version/s: None
Fix Version/s: 2.7.0

Type: Task Priority: Major - P3
Reporter: Robert Stam Assignee: Robert Stam
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Epic Link: CSHARP MongoDB 4.0 Support

 Description   

In server version 4.0 the server has started returning an errorLabels field when returning an error (i.e. with { ok : 0 }).

This needs to be exposed to the application.

It has also been decided that drivers will sometimes add ErrorLabels to certain exceptions, so rather than defining this new Property at the MongoCommandException level it should be defined at the MongoException level.



 Comments   
Comment by Githook User [ 10/Jun/18 ]

Author:

{'username': 'rstam', 'name': 'rstam', 'email': 'robert@robertstam.org'}

Message: CSHARP-2294: Added HasErrorLabel and RemoveErrorLabel.
Branch: master
https://github.com/mongodb/mongo-csharp-driver/commit/7fe5e800cdaf3877f824e9fc46630a4224962c59

Comment by Githook User [ 10/Jun/18 ]

Author:

{'username': 'rstam', 'name': 'rstam', 'email': 'robert@robertstam.org'}

Message: CSHARP-2294: Add ErrorLabels property to MongoException.
Branch: master
https://github.com/mongodb/mongo-csharp-driver/commit/0d3d6e4e49ad6caaa5f262a5e2fe5bd5141d855e

Generated at Wed Feb 07 21:42:09 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.