[NETCONF-345] error-info format is not clear, throws up xml snippet Created: 31/Jan/17  Updated: 23/Sep/20

Status: Confirmed
Project: netconf
Component/s: restconf-nb
Affects Version/s: None
Fix Version/s: None

Type: Bug
Reporter: Harinath Mallepally Assignee: Iaroslav Kholiavko
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


External issue ID: 7716

 Description   

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.


Generated at Wed Feb 07 20:14:46 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.