<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:35:58 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[CSHARP-155] Support for error codes in command results and exceptions</title>
                <link>https://jira.mongodb.org/browse/CSHARP-155</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;p&gt;I would like to suggest adding support for error codes in command results and (probably) exceptions, so handling specific type of errors is easier.&lt;br/&gt;
Comparing error messages to a predefined string seems weak to me. While current driver has only one such spot (the &apos;commandResult.ErrorMessage == &quot;not master&quot;&apos; check in MongoDatabase.cs, I don&apos;t know if this is the only and proper message to close connection for), not having access to error code makes writing robust client-side code harder.&lt;/p&gt;</description>
                <environment></environment>
        <key id="14291">CSHARP-155</key>
            <summary>Support for error codes in command results and exceptions</summary>
                <type id="2" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14711&amp;avatarType=issuetype">New Feature</type>
                                            <priority id="4" iconUrl="https://jira.mongodb.org/images/icons/priorities/minor.svg">Minor - P4</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="9">Done</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="onyxmaster">Aristarkh Zagorodnikov</reporter>
                        <labels>
                    </labels>
                <created>Mon, 24 Jan 2011 12:12:16 +0000</created>
                <updated>Wed, 3 Sep 2014 23:56:05 +0000</updated>
                            <resolved>Wed, 3 Sep 2014 23:56:05 +0000</resolved>
                                    <version>1.0</version>
                                                    <component>Feature Request</component>
                                        <votes>4</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="711108" author="craiggwilson" created="Wed, 3 Sep 2014 23:56:05 +0000"  >&lt;p&gt;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.&lt;/p&gt;</comment>
                            <comment id="97823" author="spf13" created="Mon, 12 Mar 2012 15:18:21 +0000"  >&lt;p&gt;We are going to postpone doing this until we can build support for all drivers using the same numeric codes. It&apos;s a good idea, but one we need to approach with a thoughtful universal solution.&lt;/p&gt;</comment>
                            <comment id="47894" author="onyxmaster" created="Wed, 10 Aug 2011 21:41:26 +0000"  >&lt;p&gt;I would like to inform that we implemented this as a set of helper methods, so if it&apos;s not going to be added, we don&apos;t need it that much (although since &lt;a href=&quot;https://jira.mongodb.org/browse/CSHARP-299&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;https://jira.mongodb.org/browse/CSHARP-299&lt;/a&gt; is implemented, a common &quot;ErrorCode&quot; property still might be useful), so if it&apos;s not an feature that is interesting for other users, I think it should be closed.&lt;/p&gt;</comment>
                            <comment id="25587" author="plasma" created="Wed, 9 Mar 2011 07:57:50 +0000"  >&lt;p&gt;This may be better suited as a request also to the core server; some errors (like &apos;not master&apos;) don&apos;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.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="14262">CSHARP-153</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="39411">CSHARP-474</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hs0tev:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>129206</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>