Repository navigation
Conversation
…error document A 4xx response whose body is an OCI error document becomes a RegistryError, which holds the error codes and the URL. One test pins that the error codes reach the caller. The other expects the HTTP status code in the message and is ignored, because RegistryError does not hold the status code yet. Signed-off-by: Shareef Jalloq <shareef@jalloq.co.uk>
A 4xx response whose body is an OCI error document became a RegistryError with the error codes and the URL, and the status code was lost. A caller could not tell a 403 from a 404 or a 429 without reading the error codes. RegistryError now holds the status code in a code field, as ServerError does, and its message includes it. BREAKING CHANGE: OciDistributionError::RegistryError has a new field, code. Code that constructs the variant, or that matches it without `..`, needs to be updated. Signed-off-by: Shareef Jalloq <shareef@jalloq.co.uk>
sjalloq
requested review from
bacongobbler,
davidfestal,
flavio and
thomastaylor312
as code owners
November 30, 2026 21:07
This was referenced Nov 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is the "one field" fix for #334.
OciDistributionError::RegistryErrornow holds the HTTP status code of the response, in a newcode: u16field, and its message prints it.