Subject: Re: am I missing some error code

From: Martin Bjorklund <[email-masked]>
Date: Thu, 01 Mar 2007 09:14:13 +0100 (CET)

"James Balestriere (jbalestr)" <[email-masked]> 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>

/martin

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

---

From: Andy Bierman <[email-masked]>
Date: Sat, 10 Mar 2007 07:41:14 -0800

>        The end tag 'copy-config' does not match the start tag 'source'.

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