<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:10:37 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>[CDRIVER-782] Allow more detailed error reporting for failed URI parsing</title>
                <link>https://jira.mongodb.org/browse/CDRIVER-782</link>
                <project id="10030" key="CDRIVER">C Driver</project>
                    <description>&lt;p&gt;It would be helpful for other drivers wrapping libmongoc if URI parsing could return a &lt;tt&gt;bson_error_t&lt;/tt&gt; on error with some details about why parsing failed. Currently, &lt;tt&gt;NULL&lt;/tt&gt; is returned and some messages may have been emitted via &lt;tt&gt;MONGOC_WARNING()&lt;/tt&gt;, which can easily be ignored by the user (especially through another driver atop libmongoc).&lt;/p&gt;

&lt;p&gt;For example, we might find the following warning messages emitted while parsing read preferences:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;Unsupported readPreference value &lt;span class=&quot;error&quot;&gt;&amp;#91;readPreference=%s&amp;#93;&lt;/span&gt;.&quot;&lt;/li&gt;
	&lt;li&gt;&quot;Primary read preference mode conflicts with tags.&quot;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;These lines even include a comment: &quot;Warn on conflict, since read preference will be validated later&quot;; however, by that point, we&apos;ve missed the chance to provide a meaningful error (for an exception in PHP&apos;s case) to the user.&lt;/p&gt;

&lt;p&gt;In the case of read preferences and write concerns, validation is deferred until the end of &lt;tt&gt;mongoc_uri_new()&lt;/tt&gt;:&lt;/p&gt;

&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;if (!mongoc_read_prefs_is_valid(uri-&amp;gt;read_prefs)) {&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;   mongoc_uri_destroy(uri);&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;   return NULL;&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;

&lt;p&gt;The &lt;tt&gt;mongoc_read_prefs_is_valid()&lt;/tt&gt; function (and its WC equivalent) aren&apos;t in the business of providing detailed error messages (nor should they be, IMO), but we do have an opportunity to point out errors during URI parsing or when the complex structures (i.e. read preference and write concern) are constructed.&lt;/p&gt;</description>
                <environment></environment>
        <key id="224548">CDRIVER-782</key>
            <summary>Allow more detailed error reporting for failed URI parsing</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="bjori">Hannes Magnusson</assignee>
                                    <reporter username="jmikola@mongodb.com">Jeremy Mikola</reporter>
                        <labels>
                    </labels>
                <created>Thu, 6 Aug 2015 22:17:05 +0000</created>
                <updated>Thu, 2 Nov 2017 23:33:02 +0000</updated>
                            <resolved>Thu, 16 Mar 2017 18:51:02 +0000</resolved>
                                                    <fixVersion>1.7.0</fixVersion>
                                    <component>libmongoc</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="1529763" author="xgen-internal-githook" created="Tue, 21 Mar 2017 20:08:00 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;ajdavis&apos;, u&apos;name&apos;: u&apos;A. Jesse Jiryu Davis&apos;, u&apos;email&apos;: u&apos;jesse@mongodb.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-782&quot; title=&quot;Allow more detailed error reporting for failed URI parsing&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-782&quot;&gt;&lt;del&gt;CDRIVER-782&lt;/del&gt;&lt;/a&gt; leak in URI error test&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/25273b3c827868c47ee9072cfa6d24aed33a82bb&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/commit/25273b3c827868c47ee9072cfa6d24aed33a82bb&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1526060" author="xgen-internal-githook" created="Thu, 16 Mar 2017 18:48:31 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;bjori&apos;, u&apos;name&apos;: u&apos;Hannes Magnusson&apos;, u&apos;email&apos;: u&apos;bjori@php.net&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-782&quot; title=&quot;Allow more detailed error reporting for failed URI parsing&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-782&quot;&gt;&lt;del&gt;CDRIVER-782&lt;/del&gt;&lt;/a&gt; Allow more detailed error reporting for failed URI parsing&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/ba74b9fcb92d592777ccc34e04d4e50a42a630bd&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/commit/ba74b9fcb92d592777ccc34e04d4e50a42a630bd&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1005073" author="xgen-internal-githook" created="Thu, 13 Aug 2015 21:43:51 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;jmikola&apos;, u&apos;name&apos;: u&apos;Jeremy Mikola&apos;, u&apos;email&apos;: u&apos;jmikola@gmail.com&apos;}
&lt;p&gt;Message: Split out Manager constructor error tests&lt;/p&gt;

&lt;p&gt;The extra arguments test can be skipped for HHVM (as was done in #74).&lt;/p&gt;

&lt;p&gt;The read preference and write concern tests attempt to cover all permutations of invalid arguments. Detailed exceptions are only possible where we apply array options to the structures, since libmongoc currently provides no detailed errors when URI parsing fails (see: &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-782&quot; title=&quot;Allow more detailed error reporting for failed URI parsing&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-782&quot;&gt;&lt;del&gt;CDRIVER-782&lt;/del&gt;&lt;/a&gt;).&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/10gen-labs/mongo-php-driver-prototype/commit/960c51ace75b6d03af5b3f5002a354b0085a1efb&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/10gen-labs/mongo-php-driver-prototype/commit/960c51ace75b6d03af5b3f5002a354b0085a1efb&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                        <issuelink>
            <issuekey id="368699">PHPC-942</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="444499">PHPC-1020</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="341918">PHPC-887</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="413461">CDRIVER-2234</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="191008">CDRIVER-587</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_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>CDRIVER-784</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hrb0ov:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="1602">C Driver 2017 2 - Feb 10, 2019</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>