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

    https://github.com/apache/nifi/pull/1395#discussion_r113209753
  
    --- Diff: 
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/PostHTTP.java
 ---
    @@ -880,6 +936,29 @@ public long getContentLength() {
             }
         }
     
    +    private FlowFile appendResponseData(final ProcessContext context, 
final ProcessSession session, final FlowFile original, String responseBody, int 
statusCode, String mimeType) {
    +        FlowFile appended = original;
    +        switch (context.getProperty(RESPONSE_BODY_DESTINATION).getValue()) 
{
    +            case DESTINATION_ATTRIBUTE:
    +                if (context.getProperty(RESPONSE_BODY_ATTRIBUTE).isSet()) {
    +                    appended = session.putAttribute(appended, 
context.getProperty(RESPONSE_BODY_ATTRIBUTE).getValue(), responseBody);
    +                } else {
    +                    getLogger().warn("{} is set to {} but {} is not set", 
new 
Object[]{RESPONSE_BODY_DESTINATION.getName(),DESTINATION_ATTRIBUTE,RESPONSE_BODY_ATTRIBUTE.getName()});
    --- End diff --
    
    This should not be a warn. It should be an ERROR.
    
    I think it would be a good idea to add a custom validator to identify this 
very same issue during configuration, instead of ignoring it during execution.
    
    What do you think?


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to