From b3988171f620fdb5f35b15ee186334dfbbbc239e Mon Sep 17 00:00:00 2001 From: devs6186 Date: Thu, 19 Feb 2026 21:59:10 +0530 Subject: [PATCH] [tasks/github] Catch ResourceGoneException in message collection Repos with GitHub Issues disabled return HTTP 410, which raises ResourceGoneException in paginate_resource(). Only UrlNotFoundException (404) was caught, so message collection would crash on those repos and mark core as errored. Added ResourceGoneException to the except clause so the comment URL is skipped and collection continues normally. Fixes #3710 Signed-off-by: devs6186 --- augur/tasks/github/messages.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/augur/tasks/github/messages.py b/augur/tasks/github/messages.py index e8453a18df..ce31d17780 100644 --- a/augur/tasks/github/messages.py +++ b/augur/tasks/github/messages.py @@ -4,7 +4,7 @@ from augur.tasks.init.celery_app import celery_app as celery from augur.tasks.init.celery_app import AugurCoreRepoCollectionTask from augur.application.db.data_parse import * -from augur.tasks.github.util.github_data_access import GithubDataAccess, UrlNotFoundException +from augur.tasks.github.util.github_data_access import GithubDataAccess, UrlNotFoundException, ResourceGoneException from augur.tasks.github.util.github_task_session import GithubTaskManifest from augur.tasks.util.worker_util import remove_duplicate_dicts from augur.tasks.github.util.util import get_owner_repo @@ -124,8 +124,8 @@ def process_large_issue_and_pr_message_collection(repo_id, repo_git: str, logger try: messages = list(github_data_access.paginate_resource(comment_url)) all_data += messages - except UrlNotFoundException: - logger.info(f"{task_name}: PR or issue comment url of {comment_url} returned 404. Skipping.") + except (UrlNotFoundException, ResourceGoneException) as e: + logger.info(f"{task_name}: Skipping {comment_url}: {e}") skipped_urls += 1 if len(all_data) >= message_batch_size: