[NETCONF-429] Status code for patch error response is not proper. Created: 14/Jun/17  Updated: 15/Mar/19  Resolved: 22/Sep/17

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

Type: Bug
Reporter: Sudhanshu Gaur Assignee: Jakub Toth
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issue Links:
Duplicate
is duplicated by NETCONF-442 Deleting non existing data using PATC... Resolved
External issue ID: 8689

 Description   

While updating configurations using PATCH, in case there is an error, the patch response status code always says 200 OK. Ideally it should be 500 series response code. This behavior is seen in BORON-SR3.



 Comments   
Comment by Jakub Toth [ 22/Jun/17 ]

Hi,

can you please add any example of this case ?

I got error message with 400 status code when I tried this method.

Comment by Sudhanshu Gaur [ 22/Jun/17 ]

Hi,
Whenever patch request fails for any reason, we are always getting 200 OK.
This is the patch response:
{
"ietf-yang-patch:yang-patch-status": {
"patch-id": "0",
"errors": {
"error": [

{ "error-type": "application", "error-tag": "operation-failed", "error-message": "canCommit encountered an unexpected failure" }

]
},
"edit-status": {
"edit": [

{ "edit-id": "edit1", "ok": [ null ] }

]
}
}
}

But the status code is 200 OK.
PS- did you try with boron-sr3?

Sudhanshu

Comment by Jakub Toth [ 26/Jun/17 ]

Yeah, you're right. I made a bad test for this case. It's confirmed.

Comment by Jakub Toth [ 11/Aug/17 ]

https://git.opendaylight.org/gerrit/#/c/61546/

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