<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:36:55 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-463] Unexpected and not documented exception in MongoDatabase.CreateCollection(String, IMongoCollectionOptions)</title>
                <link>https://jira.mongodb.org/browse/CSHARP-463</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;p&gt;I am trying to create a collection which already exists (a capped one, if this&lt;br/&gt;
matters). As far as the method returns `CommandResult`, I expect it to return&lt;br/&gt;
an error information (and I write ahead some code that check for `Ok` and uses&lt;br/&gt;
the error message). But instead the method throws an exception.&lt;/p&gt;

&lt;p&gt;I propose either to document this exception (it is not) or, better, to not&lt;br/&gt;
throw but return an error. The latter is more expected and consistent with,&lt;br/&gt;
say, `DropCollection` which does not throw on missing collections but returns&lt;br/&gt;
error information.&lt;/p&gt;</description>
                <environment></environment>
        <key id="37741">CSHARP-463</key>
            <summary>Unexpected and not documented exception in MongoDatabase.CreateCollection(String, IMongoCollectionOptions)</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</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="robert@mongodb.com">Robert Stam</assignee>
                                    <reporter username="nightroman">Roman Kuzmin</reporter>
                        <labels>
                    </labels>
                <created>Thu, 3 May 2012 13:35:03 +0000</created>
                <updated>Thu, 2 Apr 2015 18:28:27 +0000</updated>
                            <resolved>Mon, 11 Jun 2012 21:19:05 +0000</resolved>
                                    <version>1.4.2</version>
                                    <fixVersion>1.5</fixVersion>
                                                        <votes>0</votes>
                                    <watches>0</watches>
                                                                                                                <comments>
                            <comment id="130564" author="rstam" created="Mon, 11 Jun 2012 21:18:40 +0000"  >&lt;p&gt;The general rule with all commands is that the driver throws an exception when the server returns &lt;/p&gt;
{ ok : 0 }
&lt;p&gt; as part of the result of the command.&lt;/p&gt;

&lt;p&gt;CreateCollection follows this rule to the letter. DropCollection follows it with one exception: if the server returns &lt;/p&gt;
{ ok : 0 }
&lt;p&gt; with an error message of &quot;ns not found&quot; the error is considered benign and ignored. All the drivers do this. Really the server should not be returning an error in this case, but apparently the server is not going to be changed.&lt;/p&gt;

&lt;p&gt;You don&apos;t need to check the OK property of a CommandResult. If no exception was thrown the command succeeded.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <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|hrh7lb:</customfieldvalue>

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