You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by ab...@apache.org on 2024/01/04 03:43:17 UTC

(incubator-devlake) branch fix-delete-connection-msg updated: fix: can not list the error msg

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

abeizn pushed a commit to branch fix-delete-connection-msg
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git


The following commit(s) were added to refs/heads/fix-delete-connection-msg by this push:
     new bf7e47d92 fix: can not list the error msg
bf7e47d92 is described below

commit bf7e47d92ec0c19a212a94dba71022e9294db40b
Author: abeizn <zi...@merico.dev>
AuthorDate: Thu Jan 4 11:43:06 2024 +0800

    fix: can not list the error msg
---
 backend/helpers/pluginhelper/api/connection_helper.go          | 2 +-
 backend/helpers/pluginhelper/api/ds_connection_api_helper.go   | 2 +-
 backend/helpers/pluginhelper/api/ds_scope_api_helper.go        | 2 +-
 backend/helpers/pluginhelper/api/ds_scope_config_api_helper.go | 2 +-
 backend/helpers/pluginhelper/api/scope_helper.go               | 2 +-
 backend/server/services/remote/plugin/scope_api.go             | 2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/backend/helpers/pluginhelper/api/connection_helper.go b/backend/helpers/pluginhelper/api/connection_helper.go
index 2179888b2..5e306519c 100644
--- a/backend/helpers/pluginhelper/api/connection_helper.go
+++ b/backend/helpers/pluginhelper/api/connection_helper.go
@@ -163,7 +163,7 @@ func (c *ConnectionApiHelper) Delete(connection interface{}, input *plugin.ApiRe
 			Success: false,
 			Message: err.Error(),
 			Data:    refs,
-		}, Status: err.GetType().GetHttpCode()}, nil
+		}, Status: err.GetType().GetHttpCode()}, err
 	}
 	data, marshalErr := json.Marshal(connection)
 	if marshalErr != nil {
diff --git a/backend/helpers/pluginhelper/api/ds_connection_api_helper.go b/backend/helpers/pluginhelper/api/ds_connection_api_helper.go
index 3525ae2de..126499a3f 100644
--- a/backend/helpers/pluginhelper/api/ds_connection_api_helper.go
+++ b/backend/helpers/pluginhelper/api/ds_connection_api_helper.go
@@ -59,7 +59,7 @@ func (connApi *DsConnectionApiHelper[C, S, SC]) Delete(input *plugin.ApiResource
 			Success: false,
 			Message: err.Error(),
 			Data:    refs,
-		}, Status: err.GetType().GetHttpCode()}, nil
+		}, Status: err.GetType().GetHttpCode()}, err
 	}
 	conn = connApi.Sanitize(conn)
 	return &plugin.ApiResourceOutput{
diff --git a/backend/helpers/pluginhelper/api/ds_scope_api_helper.go b/backend/helpers/pluginhelper/api/ds_scope_api_helper.go
index 2a6386348..75ea9088b 100644
--- a/backend/helpers/pluginhelper/api/ds_scope_api_helper.go
+++ b/backend/helpers/pluginhelper/api/ds_scope_api_helper.go
@@ -129,7 +129,7 @@ func (scopeApi *DsScopeApiHelper[C, S, SC]) Delete(input *plugin.ApiResourceInpu
 			Success: false,
 			Message: err.Error(),
 			Data:    refs,
-		}, Status: err.GetType().GetHttpCode()}, nil
+		}, Status: err.GetType().GetHttpCode()}, err
 	}
 	return &plugin.ApiResourceOutput{
 		Body: scope,
diff --git a/backend/helpers/pluginhelper/api/ds_scope_config_api_helper.go b/backend/helpers/pluginhelper/api/ds_scope_config_api_helper.go
index 8bfc52306..6e76341ef 100644
--- a/backend/helpers/pluginhelper/api/ds_scope_config_api_helper.go
+++ b/backend/helpers/pluginhelper/api/ds_scope_config_api_helper.go
@@ -89,7 +89,7 @@ func (connApi *DsScopeConfigApiHelper[C, S, SC]) Delete(input *plugin.ApiResourc
 			Success: false,
 			Message: err.Error(),
 			Data:    refs,
-		}, Status: err.GetType().GetHttpCode()}, nil
+		}, Status: err.GetType().GetHttpCode()}, err
 	}
 	return &plugin.ApiResourceOutput{
 		Body: scopeConfig,
diff --git a/backend/helpers/pluginhelper/api/scope_helper.go b/backend/helpers/pluginhelper/api/scope_helper.go
index 6474c47fe..935280e06 100644
--- a/backend/helpers/pluginhelper/api/scope_helper.go
+++ b/backend/helpers/pluginhelper/api/scope_helper.go
@@ -102,7 +102,7 @@ func (c *ScopeApiHelper[Conn, Scope, Tr]) Delete(input *plugin.ApiResourceInput)
 			Success: false,
 			Message: err.Error(),
 			Data:    refs,
-		}, Status: err.GetType().GetHttpCode()}, nil
+		}, Status: err.GetType().GetHttpCode()}, err
 	}
 	return &plugin.ApiResourceOutput{Body: nil, Status: http.StatusOK}, nil
 }
diff --git a/backend/server/services/remote/plugin/scope_api.go b/backend/server/services/remote/plugin/scope_api.go
index d813fe2f7..9450422e7 100644
--- a/backend/server/services/remote/plugin/scope_api.go
+++ b/backend/server/services/remote/plugin/scope_api.go
@@ -129,7 +129,7 @@ func (pa *pluginAPI) GetScope(input *plugin.ApiResourceInput) (*plugin.ApiResour
 func (pa *pluginAPI) DeleteScope(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error) {
 	refs, err := pa.scopeHelper.DeleteScope(input)
 	if err != nil {
-		return &plugin.ApiResourceOutput{Body: refs, Status: err.GetType().GetHttpCode()}, nil
+		return &plugin.ApiResourceOutput{Body: refs, Status: err.GetType().GetHttpCode()}, err
 	}
 	return &plugin.ApiResourceOutput{Body: nil, Status: http.StatusOK}, nil
 }