BUG 1330 - list key counts|values diff in payload and URI
[controller.git] / opendaylight / md-sal / sal-rest-connector / src / main / java / org / opendaylight / controller / sal / restconf / impl / ControllerContext.java
index 85c8e595396e9463b8fb7bf93437510041306b09..28e6a3c2472ee3b8723c82dc5d1050215c209bee 100644 (file)
@@ -696,8 +696,8 @@ public class ControllerContext implements SchemaContextListener {
             final int keysSize = listNode.getKeyDefinition().size();
             if( (strings.size() - consumed) < keysSize ) {
                 throw new RestconfDocumentedException(
             final int keysSize = listNode.getKeyDefinition().size();
             if( (strings.size() - consumed) < keysSize ) {
                 throw new RestconfDocumentedException(
-                        "Missing key for list \"" + listNode.getQName().getLocalName() + "\".",
-                        ErrorType.PROTOCOL, ErrorTag.INVALID_VALUE );
+                        "Missing key value for list element '" + listNode.getQName().getLocalName() + "' in the URI.",
+                        ErrorType.PROTOCOL, ErrorTag.DATA_MISSING );
             }
 
             final List<String> uriKeyValues = strings.subList( consumed, consumed + keysSize );
             }
 
             final List<String> uriKeyValues = strings.subList( consumed, consumed + keysSize );