<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 19:53:19 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>OpenDaylight JIRA</title>
    <link>https://jira.opendaylight.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>8.20.10</version>
        <build-number>820010</build-number>
        <build-date>22-06-2022</build-date>
    </build-info>


<item>
            <title>[CONTROLLER-556] Restconf RPC operations (POST /restconf/operations/&lt;moduleName&gt;:&lt;rpcName&gt;) will not handle the errors set in the RpcResult and returns Status 204 (No Content)</title>
                <link>https://jira.opendaylight.org/browse/CONTROLLER-556</link>
                <project id="10113" key="CONTROLLER">controller</project>
                    <description>&lt;p&gt;Problem:&lt;br/&gt;
Restconf RPC operations (POST /restconf/operations/&amp;lt;moduleName&amp;gt;:&amp;lt;rpcName&amp;gt;) will not handle the errors set in the RpcResult and returns Status 204 (No Content).&lt;/p&gt;

&lt;p&gt;I have my RPC implementation not to throw exceptions in case of failure but return the result for RPC with errors and successful flag set accordingly. &lt;/p&gt;

&lt;p&gt;For example, my RPC returns the following.&lt;br/&gt;
return Futures.immediateFuture(Rpcs.&amp;lt;output&amp;gt; getRpcResult(isSuccessful, output, errors));&lt;/p&gt;

&lt;p&gt;In case of failures, I am setting the isSuccessful to false and adding the RpcError to the errors collection with error code and cause etc. But, the restconf response for the RPC is Status 204 (No Content). It looks like restconf may not be looking at the errors in the RpcResult and just looking at the output.&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: Windows&lt;br/&gt;
Platform: PC&lt;/p&gt;</environment>
        <key id="25110">CONTROLLER-556</key>
            <summary>Restconf RPC operations (POST /restconf/operations/&lt;moduleName&gt;:&lt;rpcName&gt;) will not handle the errors set in the RpcResult and returns Status 204 (No Content)</summary>
                <type id="10104" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10303&amp;avatarType=issuetype">Bug</type>
                                                <status id="5" iconUrl="https://jira.opendaylight.org/images/icons/statuses/resolved.png" description="A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.">Resolved</status>
                    <statusCategory id="3" key="done" colorName="green"/>
                                    <resolution id="10003">Cannot Reproduce</resolution>
                                        <assignee username="jgloncak">Jozef Gloncak</assignee>
                                    <reporter username="mkore@ciena.com">Mallikarjun</reporter>
                        <labels>
                    </labels>
                <created>Tue, 10 Jun 2014 21:05:28 +0000</created>
                <updated>Tue, 25 Jul 2023 08:23:53 +0000</updated>
                            <resolved>Wed, 25 Jun 2014 09:49:32 +0000</resolved>
                                                                    <component>restconf</component>
                        <due>Thu, 26 Jun 2014 00:00:00 +0000</due>
                            <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="48522" author="jgloncak" created="Mon, 23 Jun 2014 08:57:08 +0000"  >&lt;p&gt;I investigated code. In artifact sal-rest-connector there is RestconfImpl.callRpc which is handling calls which you mentioned&lt;/p&gt;

&lt;p&gt;POST /restconf/operations/&amp;lt;moduleName&amp;gt;:&amp;lt;rpcName&amp;gt;&lt;/p&gt;

&lt;p&gt;This method is calling checkRpcSuccessAndThrowException method which check whether RpcResult instance is|isn&apos;t true. If it is false then also collection of errors is checked and RestconfDocumentedException is raised accordingly.&lt;/p&gt;

&lt;p&gt;There are also tests which checks that returning code in case when RpcResult.isSuccessful == false is 500:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;RestPostOperationTest.postOperationsStatusCodes.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Additionally raising of RestconfDocumentedException is tested in InvokeRpcMethodTest testing class under tests:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;testInvokeRpcWithNoPayloadRpc_FailWithRpcError()&lt;/li&gt;
	&lt;li&gt;testInvokeRpcWithNoPayloadRpc_FailNoErrors()&lt;/li&gt;
&lt;/ul&gt;



&lt;p&gt;Currently from my point of view I can&apos;t reproduce the error which you have mentioned. So if your problem still persist please provide more details or steps which have to be done to reproduce this problem.&lt;/p&gt;</comment>
                            <comment id="48523" author="jgloncak" created="Mon, 23 Jun 2014 09:06:42 +0000"  >&lt;p&gt;Test for checking of returning value when rpcResult contains collection errors was added&lt;br/&gt;
&lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/8236/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/8236/&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="48524" author="tony.tkacik@gmail.com" created="Wed, 25 Jun 2014 09:49:32 +0000"  >&lt;p&gt;Please reopen with simple minimalistic code, which will trigger behaviour which you are describing.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                            <customfield id="customfield_11400" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10208" key="com.atlassian.jira.plugin.system.customfieldtypes:textfield">
                        <customfieldname>External issue ID</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1179</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10201" key="com.atlassian.jira.plugin.system.customfieldtypes:url">
                        <customfieldname>External issue URL</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[https://bugs.opendaylight.org/show_bug.cgi?id=1179]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10000" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i02l4n:</customfieldvalue>

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