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


##########
minifi/minifi-c2/minifi-c2-service/src/main/java/org/apache/nifi/minifi/c2/service/ConfigService.java:
##########
@@ -229,7 +229,7 @@ public Response heartbeat(
                     configuration = 
configurationProviderValue.getConfiguration();
                 } catch (ConfigurationProviderException cpe) {
                     logger.warn("No flow available for agent class " + 
agentClass + ", returning No Content (204)");
-                    response = Response.noContent().build();
+                    response = Response.ok(new C2HeartbeatResponse()).build();

Review Comment:
   The warning indicates that an HTTP 204 will be returned, but the change 
returns an empty heartbeat response with an HTTP 200. It seems better in 
general to return the HTTP 204 if there is no response, but if there is a 
particular reason for return an empty heartbeat response, the warning log 
should be adjusted.



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