Uploaded image for project: 'netconf'
  1. netconf
  2. NETCONF-345

error-info format is not clear, throws up xml snippet

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • None
    • restconf-nb
    • None
    • Operating System: All
      Platform: All

    • 7716

      The restconf response for RPC is ambiguous.

      Here is a sample response I see.

      {
      "errors": {
      "error": [

      { "error-type": "application", "error-tag": "data-missing", "error-message": "tp id given is not valid", "error-info": "<severity>error</severity>" }

      ]
      }
      }

      This is JSON response and I see error-info in XML format. Shouldnt this be in JSON format?

      when I add header “Accept: application/xml”, the angular brackets are html encoded. Not sure if this is expected behavior.

      <errors xmlns="urn:ietf:params:xml:ns:yang:ietf-restconf">
      <error>
      <error-type>application</error-type>
      <error-tag>data-missing</error-tag>
      <error-message>tp id given is not valid</error-message>
      <error-info><severity>error</severity></error-info>
      </error>
      </errors>

      I see something is not right here. Please suggest and if it is a valid bug, please do the needful.

            IaroslavK Iaroslav Kholiavko
            hari@harinath.in Harinath Mallepally
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: