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

abeizn 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 b3633555d fix: graphql collector fails on transferred issues (#8075)
b3633555d is described below

commit b3633555db2f1ebb42712403e4a4603709012f22
Author: abeizn <[email protected]>
AuthorDate: Thu Sep 19 17:39:10 2024 +0800

    fix: graphql collector fails on transferred issues (#8075)
---
 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
                }

Reply via email to