|
In .NET, we should really be using exceptions to handle this. We will be reviewing all the exceptions we are throwing and attempting to better use those to help users out. Unfortunately, we are subject to the error codes the server provides and as they get better and more consistent, you will see a direct benefit in the driver.
|
|
We are going to postpone doing this until we can build support for all drivers using the same numeric codes. It's a good idea, but one we need to approach with a thoughtful universal solution.
|
|
I would like to inform that we implemented this as a set of helper methods, so if it's not going to be added, we don't need it that much (although since https://jira.mongodb.org/browse/CSHARP-299 is implemented, a common "ErrorCode" property still might be useful), so if it's not an feature that is interesting for other users, I think it should be closed.
|
|
This may be better suited as a request also to the core server; some errors (like 'not master') don't actually send back a hard coded error number (so the driver internally would not be immune to servers changing the error message either), but I agree its nice to have.
|
Generated at Wed Feb 07 21:35:58 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.