dan-s1 commented on code in PR #10244:
URL: https://github.com/apache/nifi/pull/10244#discussion_r2304337059
##########
nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/StandardNiFiServiceFacade.java:
##########
@@ -5436,9 +5436,10 @@ private FlowSnapshotContainer
getVersionedFlowSnapshot(final String registryId,
final FlowVersionLocation flowVersionLocation = new
FlowVersionLocation(selectedBranch, bucketId, flowId, flowVersion);
return flowRegistry.getFlowContents(clientUserContext,
flowVersionLocation, fetchRemoteFlows);
} catch (final FlowRegistryException e) {
- logger.error(e.getMessage(), e);
- throw new IllegalArgumentException("The Flow Registry with ID " +
registryId + " reports that no Flow exists with Bucket "
- + bucketId + ", Flow " + flowId + ", Version " +
flowVersion, e);
+ final String errorMessage = e.getMessage();
+ logger.error(errorMessage, e);
Review Comment:
Won't the error message be included twice as the logger will format the
stack trace from the `FlowRegistryException` including the message? Perhaps
this would be okay
```suggestion
logger.error("", e);
```
--
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]