Skip to content

fix: proper handling of upstream registry 404s#209

Open
Tilian wants to merge 2 commits into
git-pkgs:mainfrom
Tilian:fix/unfail-upstream-404
Open

fix: proper handling of upstream registry 404s#209
Tilian wants to merge 2 commits into
git-pkgs:mainfrom
Tilian:fix/unfail-upstream-404

Conversation

@Tilian

@Tilian Tilian commented Jul 23, 2026

Copy link
Copy Markdown

Fixes #208.

@andrew andrew left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please address the remaining 404 paths:

  • Add ErrUpstreamNotFound handling to the URL-based artifact handlers for Debian, RPM, NuGet, PyPI, Composer, CRAN, Julia, Conda, and Conan, with route-level tests. These paths still return 502.
  • Bump github.com/git-pkgs/registries to v0.6.3, which includes the circuit-breaker fix from registries#44. Version 0.6.2 counts 404s as failures, so repeated misses eventually become 502s.
  • Refactor the shared Gem and Hex error handling so the dupl lint check succeeds.

@Tilian

Tilian commented Jul 23, 2026

Copy link
Copy Markdown
Author

Thanks for the super quick review!

I've mapped upstream 404s for all remaining artifact handlers via a shared serveArtifactError helper.
OCI's BLOB_UNKNOWN now returns 404 too. Actual fetch failures return INTERNAL_ERROR instead.

Per-ecosystem fetch-fail log lines are now being normalized to "failed to get artifact". The associated ecosystem can be identified through the INFO-level logging (or the URL).

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Downloading of Artifacts return 502 when upstream returns 404 (for all ecosystems except Go)

2 participants