pulsar-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jerryp...@apache.org
Subject [pulsar] branch master updated: fix: get list connectors return status (#3532)
Date Fri, 08 Feb 2019 02:02:27 GMT
This is an automated email from the ASF dual-hosted git repository.

jerrypeng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git


The following commit(s) were added to refs/heads/master by this push:
     new d9e1370  fix: get list connectors return status (#3532)
d9e1370 is described below

commit d9e1370a56f595e5613f6899220b05f8b695f928
Author: Boyang Jerry Peng <jerry.boyang.peng@gmail.com>
AuthorDate: Thu Feb 7 18:02:21 2019 -0800

    fix: get list connectors return status (#3532)
---
 .../org/apache/pulsar/functions/worker/rest/api/ComponentImpl.java    | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/rest/api/ComponentImpl.java
b/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/rest/api/ComponentImpl.java
index cde2aae..2f4856e 100644
--- a/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/rest/api/ComponentImpl.java
+++ b/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/rest/api/ComponentImpl.java
@@ -1037,9 +1037,7 @@ public abstract class ComponentImpl {
 
     public List<ConnectorDefinition> getListOfConnectors() {
         if (!isWorkerServiceAvailable()) {
-            throw new WebApplicationException(
-                    Response.status(Status.SERVICE_UNAVAILABLE).type(MediaType.APPLICATION_JSON)
-                            .entity(new ErrorData("Function worker service is not avaialable")).build());
+            throwUnavailableException();
         }
 
         return this.worker().getConnectorsManager().getConnectors();


Mime
View raw message