nokia / vscode-netconf

BSD 3-Clause "New" or "Revised" License
18 stars 3 forks source link

"TypeError: data.rpc-reply.rpc-error.error-message.trim is not a function" with wrong xml configuration #2

Open balaji07s opened 9 months ago

balaji07s commented 9 months ago

Hi team,

"If I push an XML configuration with a mistake using the Netconf client extension in VS Code, I receive an error message as follows:

TypeError: data.rpc-reply.rpc-error.error-message.trim is not a function

However, it should display the accurate error message provided by the Netconf server."

jgroom33 commented 7 months ago

This reply triggers the same error:

<rpc-reply message-id="edit-config-2"
  xmlns:mef-fp="urn:ciena:params:xml:ns:yang:ciena-pn:ciena-mef-fp"
  xmlns:ncx="http://netconfcentral.org/ns/yuma-ncx" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <rpc-error>
    <error-type>application</error-type>
    <error-tag>data-missing</error-tag>
    <error-severity>error</error-severity>
    <error-app-tag>instance-required</error-app-tag>
    <error-path>/mef-fp:fps/mef-fp:fp[mef-fp:name='remote-fp2']/mef-fp:classifier-list[1]</error-path>
    <error-message xml:lang="en">required value instance not found, or resource in use</error-message>
    <error-info>
      <bad-value>classifier-list</bad-value>
      <error-number>310</error-number>
    </error-info>
  </rpc-error>
</rpc-reply>

I suspect it is because xml:lang="en" not being handled.