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 85c8e59..28e6a3c 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(
-                        "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 );

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.