diff --git a/connectors/src/connectors/github/lib/github_api.ts b/connectors/src/connectors/github/lib/github_api.ts index debb6f18cac0..4ac006814fb9 100644 --- a/connectors/src/connectors/github/lib/github_api.ts +++ b/connectors/src/connectors/github/lib/github_api.ts @@ -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;