Copilot commented on code in PR #2262:
URL: https://github.com/apache/nifi-minifi-cpp/pull/2262#discussion_r4015214401


##########
minifi_rust/minifi_native/src/api/errors.rs:
##########
@@ -69,23 +69,31 @@ impl From<RouteError> for ProcessError {
 
 impl From<MinifiError> for ProcessError {
     fn from(err: MinifiError) -> Self {
-        ProcessError::Fatal(err)
+        ProcessError::Route(RouteError {
+            relationship: "failure",
+            source: Box::new(err),
+            log_level: LogLevel::Warn,
+        })

Review Comment:
   This blanket conversion also changes every existing `?` on a `MinifiError` 
inside `ComplexProcessor` implementations into `Route("failure")`. Those 
processors own their session bookkeeping, so the wrapper has no current 
FlowFile to route and `process_error_to_status` instead reports 
`UNKNOWN_ERROR`; for example, `GenerateFlowFileRs` session operations, 
`LogAttributeRs::transfer`, `ZooProcessorRs` controller-service lookups, and 
`GetFileRs::report_metrics` now all take this unroutable path. Please migrate 
those top-level/infrastructure operations to `.rollback_err()?` (including the 
other Kamikaze trigger branches), or otherwise prevent `Route` from escaping 
the complex/source wrappers.
   
   This issue also appears on line 85 of the same file.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to