<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:53:36 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>[JAVA-1012] MongoException thrown for any document that has key named &apos;err&apos;</title>
                <link>https://jira.mongodb.org/browse/JAVA-1012</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;I&apos;ve found a bug in the mongo java driver (v.2.11.3). &lt;/p&gt;

&lt;p&gt;Any document containing a key &apos;err&apos; or &apos;errmsg&apos; will throw a MongoException when retrieved using findOne().&lt;/p&gt;

&lt;p&gt;com.mongodb.MongoException: POSTAL_CODE_NOT_FOUND&lt;br/&gt;
        at com.mongodb.MongoException.parse(MongoException.java:82)&lt;br/&gt;
        at com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:292)&lt;br/&gt;
        at com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:273)&lt;br/&gt;
        at com.mongodb.DBCollection.findOne(DBCollection.java:347)&lt;br/&gt;
        at com.mongodb.DBCollection.findOne(DBCollection.java:332)&lt;/p&gt;

&lt;p&gt;I traced the problem to com.mongodb.ServerError. &lt;/p&gt;

&lt;p&gt;public class ServerError {&lt;/p&gt;

&lt;p&gt;    ServerError( DBObject o )&lt;/p&gt;
{
        _err = getMsg( o , null );
        if ( _err == null )
            throw new IllegalArgumentException( &quot;need to have $err&quot; );
        _code = getCode( o );
    }

&lt;p&gt;    static String getMsg( BSONObject o , String def )&lt;/p&gt;
{
        Object e = o.get( &quot;$err&quot; );
        if ( e == null )
            e = o.get( &quot;err&quot; );
        if ( e == null )
            e = o.get( &quot;errmsg&quot; );
        if ( e == null )
            return def;
        return e.toString();
    }

&lt;p&gt;Not sure why it would try to interpret an application level &apos;err&apos; message as a reason to throw a MongoException:&lt;/p&gt;

</description>
                <environment></environment>
        <key id="93987">JAVA-1012</key>
            <summary>MongoException thrown for any document that has key named &apos;err&apos;</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</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="3">Duplicate</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="carl@researchforgood.com">Carl Sayres</reporter>
                        <labels>
                    </labels>
                <created>Sat, 12 Oct 2013 21:14:37 +0000</created>
                <updated>Sun, 13 Oct 2013 16:43:27 +0000</updated>
                            <resolved>Sun, 13 Oct 2013 16:43:27 +0000</resolved>
                                    <version>2.11.3</version>
                                                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="440256" author="jeff.yemin" created="Sun, 13 Oct 2013 16:43:27 +0000"  >&lt;p&gt;This has been fixed already as part of &lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-978&quot; title=&quot;2.12: Drivers should check the query failure bit even on getmore response&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-978&quot;&gt;&lt;del&gt;JAVA-978&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                    <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|hrti8n:</customfieldvalue>

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