[NETCONF-682] RFC8040 compliance - wrong URI returns incorrect HTTP status Created: 04/May/20  Updated: 07/Jul/20  Resolved: 07/Jul/20

Status: Resolved
Project: netconf
Component/s: netconf
Affects Version/s: None
Fix Version/s: Aluminium, Magnesium SR2, Sodium SR4

Type: Bug Priority: Medium
Reporter: Lukas Baca Assignee: Lukas Baca
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Relates
relates to CONTROLLER-671 Restconf returns Status code 409 if l... Resolved

 Description   

In every version of draft and RFC, the return code for "data-missing" is 409:

https://tools.ietf.org/html/draft-bierman-netconf-restconf-04

https://tools.ietf.org/html/draft-ietf-netconf-restconf-18

https://tools.ietf.org/html/rfc8040

However in ODL, the return code for "data-missing" is 404:

HTTP status returned: 404 Not Found

{
 "errors": {
 "error": [
 {
 "error-message": "Schema node tx-frequenc does not exist in module.",
 "error-tag": "data-missing",
 "error-type": "protocol"
 }
 ]
 }
}

 

In ticket from 2014 (https://jira.opendaylight.org/browse/CONTROLLER-671), return code changed from 409 to 404:

The base specification listed the error code to be 409, which is in
direct violation on HTTP. The restconf specification will be fixed in
the upcoming draft, meanwhile we are going for the new, sane behavior
regardless.

However nothing changed in RFC draft since 2014 (e.g. errata was rejected):

https://www.rfc-editor.org/errata/eid5565

 



 Comments   
Comment by Robert Varga [ 04/May/20 ]

This is tracked in an errata, https://www.rfc-editor.org/errata/eid5565 , which has been rejected.

Comment by Lukas Baca [ 04/May/20 ]

sorry typo in commit. Problem is now is here 404 but every draft have 409

We want change this value to 409

Comment by Jamo Luhrsen [ 04/May/20 ]

rovarga, the task here is to return 409 for the data-missing case which we see outlined in the 8040 RFC Right now we are getting 404.

The bierman draft also has 409 for data-missing. I didn't really follow
the original bugzilla on this to understand why it was changed from 409 to 404 originally.
Is there some other spec I should be looking?

Comment by Robert Varga [ 06/May/20 ]

jluhrsen the core argument based on HTTP/1.1 (https://tools.ietf.org/html/rfc7231) and the initial response is here: https://mailarchive.ietf.org/arch/msg/netconf/hkVDdHK4xA74NgvXzWP0zObMiyY/

 

Comment by Robert Varga [ 07/Jul/20 ]

Magnesium/Sodium will carry this as a selectable behavior.

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