[Contents] [Prev] [Next] [Index] [Report an Error]

Handling Errors

If the NETCONF server cannot incorporate the configuration data, the <rpc-error> tag element is returned with information explaining the reason for the failure. By default, when the NETCONF server encounters an error while incorporating new configuration data into the candidate configuration, it halts the incorporation process. A client application can explicitly specify this response to errors by including the <error-option> tag element with the value stop-on-error in the <edit-config> tag element:

<rpc>
    <edit-config>
        <error-option>stop-on-error</error-option>
        <!- - other child tag elements of the <edit-config> tag element - ->
    </edit-config>
</rpc>
]]>]]>

Alternatively, the application can specify that the NETCONF server continue to incorporate new configuration data when it encounters an error. The application includes the <error-option> tag element with the value ignore-error in the <edit-config> tag element:

<rpc>
    <edit-config>
        <error-option>ignore-error</error-option>
        <!- - other child tag elements of the <edit-config> tag element - ->
    </edit-config>
</rpc>
]]>]]>

The client application can include the optional <test-option> tag element described in the NETCONF specification. Regardless of the value provided, the NETCONF server for the JUNOS software performs a basic syntax check on the configuration data in the <edit-config> tag element. When the <test-option> tag is included, NETCONF performs a complete syntactic and semantic validation in response to the <commit> and <validate> tag elements (that is, when the configuration is committed or explicitly checked), but not in response to the <edit-config> tag element. For information about the <commit> and <validate> tag elements, see Committing Configurations.


[Contents] [Prev] [Next] [Index] [Report an Error]