| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Ecluse.Core.Server.Pipeline.Tarball.Refusal
Description
The refusals the artifact path can answer with, and their rendering onto the route's replies.
The leg dispatch and the public leg render through here, so one artifact outcome has one status and one message wherever it was decided.
Synopsis
- artifactOutcomeStatus :: ServeDecision -> ArtifactStatus
- artifactError :: TarballReplies response -> PackumentDeps -> ServeDecision -> response
- internalArtifactError :: TarballReplies response -> response
- crossHostRefused :: TarballReplies response -> response
- upstreamUnavailable :: ServeDecision
- versionAbsent :: ServeDecision
- firstPartyMissRefusal :: OriginMiss -> ServeDecision
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 a non-admit artifact outcome as the serve error model. A transient status carries no suggested delay, because the single-artifact path has none to offer.
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 public-upstream outage (to 503).
versionAbsent :: ServeDecision Source #
A version absent from the public metadata. Its cause is terminal, and artifactOutcomeStatus
overrides that status to a 404 forwarded miss.
firstPartyMissRefusal :: OriginMiss -> ServeDecision Source #
The refusal a first-party private miss renders: a settled absence 404, an outage 503.