Skip to content

Catch API NotFoundException to skip deleted/inaccessible repos - #113

Merged
myleshenderson merged 1 commit into
masterfrom
myles/MW-10870-additional-not-found-errors
Mar 10, 2026
Merged

Catch API NotFoundException to skip deleted/inaccessible repos#113
myleshenderson merged 1 commit into
masterfrom
myles/MW-10870-additional-not-found-errors

Conversation

@myleshenderson

@myleshenderson myleshenderson commented Mar 10, 2026

Copy link
Copy Markdown

Summary

  • Adds NotFoundException (GitHub REST API 404) to the existing except block in do_sync() alongside GitLocalRepoNotFoundException
  • Repos that return HTTP 404 from the GitHub API (deleted, renamed, or permissions revoked) are now logged and skipped instead of crashing the entire ingest job
  • Adds two unit tests for the new API 404 skip behavior

Context

PR #22 on minware-singer-utils handled 404s during git clone/fetch, but the error in MW-10870 is a GitHub REST API 404 (tap_github.NotFoundException), which is a different code path. This PR closes the gap.

Test plan

  • Unit test: repo skipped on API 404, sync continues to next repo
  • Unit test: state not written for API 404-skipped repo
  • CI

Jira: MW-10870

🤖 Generated with Claude Code

The existing GitLocalRepoNotFoundException handler only catches 404s
during git clone/fetch. Repos that return 404 from the GitHub REST API
(e.g. deleted or permissions-revoked repos) still crashed the ingest job.
Add NotFoundException to the same except block so these repos are logged
and skipped gracefully.

Jira: MW-10870

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@myleshenderson
myleshenderson requested a review from aaboyd March 10, 2026 20:37
@myleshenderson myleshenderson added the low-risk Low risk changes not needing review label Mar 10, 2026
@myleshenderson
myleshenderson merged commit fae8ab1 into master Mar 10, 2026
1 check passed
@myleshenderson
myleshenderson deleted the myles/MW-10870-additional-not-found-errors branch March 10, 2026 20:38

@aaboyd aaboyd left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

low-risk Low risk changes not needing review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants