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

RFC8040 compliance - wrong URI returns incorrect HTTP status

XMLWordPrintable

      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

       

            blukas Lukas Baca
            blukas Lukas Baca
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: