[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: am I missing some error code



Martin Bjorklund wrote:
"James Balestriere (jbalestr)" <jbalestr@cisco.com> wrote:
Hi ,

Someone sends this request
<rpc message-id="8.25">
<copy-config><target><running/></target><source><startup/></copy-config>
</rpc>

and gets an operation-failed error and starts questioning the
capabilities
my box supports.

But, when I go through the error codes in Appendix A, I do not see any
error code
which deals with malformed XML so I have to use the catch-all
operation-failed. I think in some cases returning operation-failed to malformed xml could
be a
 bit misleading.

Have I missed some error code somewhere which is more appropriate ?
or do we need to add one ?

You can use your own <error-app-tag>.  And you can also send your own
structured well-defined error messages <error-info>.  We're using ~10
error-app-tag and corresponding error-info; nor for this particular
case though.  We just send a generic operation-failed with:

    <error-message xml:lang="en">
       The end tag 'copy-config' does not match the start tag 'source'.
    </error-message>



Sorry I missed this thread -- this is simply an 'unknown-element' error,
because it is an unexpected element, which is defined in a confusing way:

   Tag:         unknown-element
   Error-type:  rpc, protocol, application
   Severity:    error
   Error-info:  <bad-element> : name of the unexpected element
   Description: An unexpected element is present.



/martin

Andy

--
to unsubscribe send a message to netconf-request@ops.ietf.org with
the word 'unsubscribe' in a single line as the message text body.
archive: <http://ops.ietf.org/lists/netconf/>