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

Invalid error message for joint ranges

    XMLWordPrintable

Details

    • Bug
    • Status: Open
    • Medium
    • Resolution: Unresolved
    • None
    • None
    • restconf-nb
    • None
    • Version: Aluminium SR1

    Description

      YANG model has a leaf defined as:

      leaf myleaf {
          type uint8 {
              range "0..1 | 128..255";
               }
      }

      When RPC is being called with invalid myleaf value between 2 and 127 RESTCONF replies with correct error message:

      {"errors":\{"error":[{"error-type":"protocol","error-tag":"malformed-message","error-info":"Value \'100\'  is not in required ranges [[0..1], [128..255]]","error-message":"Error parsing input: Value \'100\'  is not in required ranges [[0..1], [128..255]]"}]}}
      

      However if RPC is being called with invalid myleaf value above 255, it replies with invalid error message:

      {"errors":\{"error":[{"error-type":"protocol","error-tag":"malformed-message","error-info":"Invalid range: 300, expected: [[0..255]].","error-message":"Error parsing input: Invalid range: 300, expected: [[0..255]]."}]}}
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            hjslgfsd7 Valentin Mayamsin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: