exceptionfactory commented on code in PR #10244:
URL: https://github.com/apache/nifi/pull/10244#discussion_r2301670448


##########
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);
+            throw new IllegalArgumentException("Error while retrieving the 
flow [%s], in bucket [%s], in branch [%s], with version [%s] using Flow 
Registry Client with ID [%s]: %s".formatted(flowId,

Review Comment:
   Recommend a slight adjustment, removing the comma characters since the 
values are already delimited:
   ```suggestion
               throw new IllegalArgumentException("Error retrieving flow [%s] 
in bucket [%s] branch [%s] with version [%s] using Flow Registry Client with ID 
[%s]: %s".formatted(flowId,
   ```



-- 
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