Skip to content

Commit

Permalink
Ignore GH issue not found (#6209)
Browse files Browse the repository at this point in the history
  • Loading branch information
flvndvd authored Jul 15, 2024
1 parent e5d542e commit 4729291
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions connectors/src/connectors/github/lib/github_api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,12 @@ export async function getIssue(
isPullRequest: !!issue.pull_request,
};
} catch (err) {
// Handle excessive redirection during issue retrieval by safely ignoring the issue.
if (isGithubRequestRedirectCountExceededError(err)) {
// Handle excessive redirection or issue not found errors during issue retrieval
// by safely ignoring the issue and logging the error.
if (
isGithubRequestRedirectCountExceededError(err) ||
isGithubRequestErrorNotFound(err)
) {
logger.info({ ...loggerArgs, err: err.message }, "Failed to get issue.");

return null;
Expand Down

0 comments on commit 4729291

Please sign in to comment.