This is an automated email from the ASF dual-hosted git repository.
klesh pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
The following commit(s) were added to refs/heads/main by this push:
new 59f0eb911 fix: can not list the error msg (#6746)
59f0eb911 is described below
commit 59f0eb911642bac4c3be909e1d1ed408aba0697b
Author: abeizn <[email protected]>
AuthorDate: Fri Jan 5 11:42:34 2024 +0800
fix: can not list the error msg (#6746)
---
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
}