Report ErrorType.APPLICATION from codecs
[yangtools.git] / data / yang-data-impl / src / main / java / org / opendaylight / yangtools / yang / data / impl / codec / StringStringCodec.java
index cb34f1cc4a0fc64cb90eca742801da78e36d51a5..4d1bcedc3c145cdfc4486efb9f4e23ba77c7ed6d 100644 (file)
@@ -50,7 +50,7 @@ public class StringStringCodec extends TypeDefinitionAwareCodec<String, StringTy
         if (lengthConstraint != null) {
             final RangeSet<Integer> ranges = lengthConstraint.getAllowedRanges();
             if (!ranges.contains(str.codePointCount(0, str.length()))) {
-                throw new YangInvalidValueException(ErrorType.PROTOCOL, lengthConstraint,
+                throw new YangInvalidValueException(ErrorType.APPLICATION, lengthConstraint,
                     "String " + str + " does not match allowed lengths " + ranges);
             }
         }