public static ValidationException newScrubbedException()

in src/main/java/software/amazon/cloudformation/resource/exceptions/ValidationException.java [103:116]


    public static ValidationException newScrubbedException(final org.everit.json.schema.ValidationException e) {
        // A parent exception has multiple errors in the subSchema, and will just emit
        // "{X} schema validations found"
        final boolean isParentException = e.getKeyword() == null && e.getCausingExceptions() != null
            && !e.getCausingExceptions().isEmpty();
        if (isParentException || SAFE_KEYWORDS.contains(e.getKeyword())) {
            return new ValidationException(e);
        } else {
            final String errorMessage = String.format("%s: failed validation constraint for keyword [%s]",
                e.getPointerToViolation(), e.getKeyword());

            return new ValidationException(errorMessage, e);
        }
    }