Github user jfrazee commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/1969#discussion_r127808068
  
    --- Diff: 
nifi-nar-bundles/nifi-mongodb-bundle/nifi-mongodb-processors/src/main/java/org/apache/nifi/processors/mongodb/GetMongo.java
 ---
    @@ -59,14 +59,21 @@
         public static final Validator DOCUMENT_VALIDATOR = new Validator() {
             @Override
             public ValidationResult validate(final String subject, final 
String value, final ValidationContext context) {
    +            final ValidationResult.Builder builder = new 
ValidationResult.Builder();
    +            builder.subject(subject).input(value);
    +
    +            if (context.isExpressionLanguageSupported(subject) && 
context.isExpressionLanguagePresent(value)) {
    +                return builder.valid(true).explanation("Contains 
Expression Language").build();
    +            }
    +
                 String reason = null;
                 try {
                     Document.parse(value);
                 } catch (final RuntimeException e) {
                     reason = e.getClass().getName();
    --- End diff --
    
    Seems like this should be `e.getMessage()` or `get.getClass().getName() + 
": " + e.getMessage()` if you want the underlying exception class.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to