[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: am I missing some error code
"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>
/martin
--
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/>