aahmed-se commented on a change in pull request #3168: Refactor api commands
URL: https://github.com/apache/pulsar/pull/3168#discussion_r242733916
 
 

 ##########
 File path: 
pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/rest/api/ComponentImpl.java
 ##########
 @@ -1147,16 +1075,17 @@ public Response triggerFunction(final String tenant,
         }
     }
 
-    public Response getFunctionState(final String tenant,
-                                     final String namespace,
-                                     final String functionName,
-                                     final String key) {
+    public FunctionState getFunctionState(final String tenant,
+                                          final String namespace,
+                                          final String functionName,
+                                          final String key) {
+
         if (!isWorkerServiceAvailable()) {
-            return getUnavailableResponse();
+            throwUnavailableException();
         }
 
         if (null == worker().getStateStoreAdminClient()) {
-            return getStateStoreUnvailableResponse();
+            getStateStoreUnvailableResponse();
 
 Review comment:
   We are throwing an exception why would there be a return value

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to