Github user JPercivall commented on a diff in the pull request:
https://github.com/apache/nifi/pull/576#discussion_r69586209
--- Diff:
nifi-nar-bundles/nifi-elasticsearch-bundle/nifi-elasticsearch-processors/src/main/java/org/apache/nifi/processors/elasticsearch/PutElasticsearchHttp.java
---
@@ -324,7 +351,6 @@ public void onTrigger(final ProcessContext context,
final ProcessSession session
logger.error("Failed to insert into Elasticsearch due to {}.",
new Object[]{ioe.getLocalizedMessage()}, ioe);
--- End diff --
I really don't like this huge try/catch. The only two places that this
catches are lines 208 and 305. For 208, that is failing to create the URL, you
should probably yield the context/throw an error because something is weirdly
wrong. For 305, it is failing to read the bytes of the response, just move it a
line lower into the try/catch block below it.
---
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.
---