This is an automated email from the ASF dual-hosted git repository.
abeizn pushed a commit to branch fix#7969
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
The following commit(s) were added to refs/heads/fix#7969 by this push:
new fcd4b4433 fix: graphql collector fails on transferred issues
fcd4b4433 is described below
commit fcd4b44339ac92eb40bc615bb998a4e97d229a9f
Author: abeizn <[email protected]>
AuthorDate: Thu Sep 19 17:20:13 2024 +0800
fix: graphql collector fails on transferred issues
---
backend/helpers/pluginhelper/api/graphql_collector.go | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/backend/helpers/pluginhelper/api/graphql_collector.go
b/backend/helpers/pluginhelper/api/graphql_collector.go
index e83435e9b..47368d007 100644
--- a/backend/helpers/pluginhelper/api/graphql_collector.go
+++ b/backend/helpers/pluginhelper/api/graphql_collector.go
@@ -22,6 +22,7 @@ import (
"encoding/json"
"net/http"
"reflect"
+ "strings"
"time"
"github.com/apache/incubator-devlake/core/dal"
@@ -276,7 +277,11 @@ func (collector *GraphqlCollector) fetchAsync(reqData
*GraphqlRequestData, handl
if len(dataErrors) > 0 {
if !collector.args.IgnoreQueryErrors {
for _, dataError := range dataErrors {
-
collector.checkError(errors.Default.Wrap(dataError, `graphql query got error`))
+ if strings.Contains(dataError.Error(), "Could
not resolve to an Issue") {
+
collector.args.Ctx.GetLogger().Warn(nil, "Issue may have been transferred.")
+ } else {
+
collector.checkError(errors.Default.Wrap(dataError, `graphql query got error`))
+ }
}
return
}