[
https://issues.apache.org/jira/browse/NIFI-15424?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18049855#comment-18049855
]
David Handermann commented on NIFI-15424:
-----------------------------------------
Thanks for proposing this change [~yuanhao.zhu].
It is important to retain some level of distinction between Java exceptions and
relationships, although there may be direct correlation at some points. One
primary reason for this is to avoid coupling Processor implementation too
tightly to a particular Java library.
With that background, however, there may be an opportunity for refining certain
types of failure behavior. The {{Failure}} relationship is intended to handle
exceptions related to socket communication, so if it is also being used for
certain HTTP response failures, I can see how that would be confusing.
Can you provide a particular example where an HTTP response processing issue is
being routed to the Failure relationship? It would be ideal if this could be
reproduced from a public URL, but if not, at least providing some detailed
information with the exception stack trace would be useful in considering next
steps.
> InvokeHTTPProcessor: Add dedicated relationship for Java exceptions
> (transport/runtime) instead of routing to failure
> ---------------------------------------------------------------------------------------------------------------------
>
> Key: NIFI-15424
> URL: https://issues.apache.org/jira/browse/NIFI-15424
> Project: Apache NiFi
> Issue Type: Improvement
> Components: Core Framework
> Reporter: Yuanhao Zhu
> Priority: Major
> Original Estimate: 20m
> Remaining Estimate: 20m
>
> *Problem*
> Today, if {{InvokeHTTP}} throws a Java exception during the HTTP call (e.g.
> network interruption, DNS failure, connect reset/timeout), it routes the
> FlowFile to the existing error/failure relationship and sets:
> * {{invokehttp.java.exception.class}}
> * {{invokehttp.java.exception.message}}
> This mixes “HTTP response failures” with “request didn’t complete due to
> Java/transport exception”, making downstream handling (retry/alerting) messy.
> *Proposal*
> Add a dedicated relationship, e.g. {{{}java_exception{}}}, and route
> FlowFiles there when the HTTP call fails due to a Java exception (no valid
> HTTP response obtained). Keep existing relationships unchanged for normal
> HTTP outcomes.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)