ecluse:ecluse-core
Safe HaskellNone
LanguageGHC2021

Ecluse.Core.Server.Pipeline.Tarball.Refusal

Description

Artifact refusal decisions and their route-specific responses.

Synopsis

Rendering a refusal

artifactOutcomeStatus :: ServeDecision -> ArtifactStatus Source #

Missing versions and a first-party absence map to 404. Other outcomes use artifactStatus.

artifactError :: TarballReplies response -> PackumentDeps -> ServeDecision -> response Source #

Render an artifact refusal, preserving any retry delay.

internalArtifactError :: TarballReplies response -> response Source #

The 500 for an artifact URL that configuration and the package name could not form.

crossHostRefused :: TarballReplies response -> response Source #

The 403 for an artifact host the tarball-host policy does not permit.

The refusals themselves

upstreamUnavailable :: ServeDecision Source #

A transient upstream outage, public or private (to 503).

upstreamCooling :: RetryAfter -> ServeDecision Source #

A public authority that supplies a positive retry delay.

versionAbsent :: ServeDecision Source #

A version absent from the public metadata. Its cause is terminal, and artifactOutcomeStatus overrides it to a 404 forwarded miss.

privateMissRefusal :: PackumentDeps -> PackageName -> OriginMiss -> Maybe ServeDecision Source #

The refusal a private miss renders, or Nothing when the public leg may answer. Only a settled absence of a name outside first-party reaches that leg, so no public namesake replaces a private package.

privateReadRefusal :: PackumentDeps -> PackageName -> ReadFailure -> ServeDecision Source #

A failed private read: an unavailable registry 503 with its delay, an invalid reply 502. A first-party name keeps its own words.