Skip to content

Commit f582083

Browse files
authored
Correctly wrap GraphQl error (#2149)
1 parent c36d792 commit f582083

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/github/issues.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ func fetchIssueIDs(ctx context.Context, gqlClient *githubv4.Client, owner, repo
6262
}
6363

6464
if err := gqlClient.Query(ctx, &query, vars); err != nil {
65-
return "", "", fmt.Errorf("failed to get issue ID")
65+
return "", "", fmt.Errorf("failed to get issue ID: %w", err)
6666
}
6767

6868
return query.Repository.Issue.ID, "", nil
@@ -84,7 +84,7 @@ func fetchIssueIDs(ctx context.Context, gqlClient *githubv4.Client, owner, repo
8484
vars["duplicateOf"] = githubv4.Int(duplicateOf) // #nosec G115 - issue numbers are always small positive integers
8585

8686
if err := gqlClient.Query(ctx, &query, vars); err != nil {
87-
return "", "", fmt.Errorf("failed to get issue ID")
87+
return "", "", fmt.Errorf("failed to get issue ID: %w", err)
8888
}
8989

9090
return query.Repository.Issue.ID, query.Repository.DuplicateIssue.ID, nil

0 commit comments

Comments
 (0)