You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampipes.apache.org by ri...@apache.org on 2022/01/06 21:16:35 UTC

[incubator-streampipes] 02/03: [hotfix] Minor improvement of exception handling

This is an automated email from the ASF dual-hosted git repository.

riemer pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git

commit c77f00bc20b9a2ae809c37e48ee2500844be3c71
Author: Dominik Riemer <do...@gmail.com>
AuthorDate: Thu Jan 6 21:35:45 2022 +0100

    [hotfix] Minor improvement of exception handling
---
 .../streampipes/manager/execution/http/HttpRequestBuilder.java      | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/streampipes-pipeline-management/src/main/java/org/apache/streampipes/manager/execution/http/HttpRequestBuilder.java b/streampipes-pipeline-management/src/main/java/org/apache/streampipes/manager/execution/http/HttpRequestBuilder.java
index 671235a..ddd771f 100644
--- a/streampipes-pipeline-management/src/main/java/org/apache/streampipes/manager/execution/http/HttpRequestBuilder.java
+++ b/streampipes-pipeline-management/src/main/java/org/apache/streampipes/manager/execution/http/HttpRequestBuilder.java
@@ -22,7 +22,6 @@ import com.google.gson.JsonSyntaxException;
 import org.apache.http.client.fluent.Request;
 import org.apache.http.client.fluent.Response;
 import org.apache.http.entity.ContentType;
-import org.apache.streampipes.manager.storage.UserService;
 import org.apache.streampipes.model.base.NamedStreamPipesEntity;
 import org.apache.streampipes.model.client.user.Permission;
 import org.apache.streampipes.model.client.user.Principal;
@@ -65,8 +64,7 @@ public class HttpRequestBuilder {
                       .execute();
       return handleResponse(httpResp);
     } catch (Exception e) {
-      e.printStackTrace();
-      LOG.error(e.getMessage());
+      LOG.error("Could not perform invocation request", e);
       return new PipelineElementStatus(endpointUrl, payload.getName(), false, e.getMessage());
     }
   }
@@ -76,7 +74,7 @@ public class HttpRequestBuilder {
       Response httpResp = Request.Delete(endpointUrl).connectTimeout(10000).execute();
       return handleResponse(httpResp);
     } catch (Exception e) {
-      LOG.error("Could not stop pipeline " + endpointUrl, e.getMessage());
+      LOG.error("Could not stop pipeline {}", endpointUrl, e);
       return new PipelineElementStatus(endpointUrl, payload.getName(), false, e.getMessage());
     }
   }