Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API error: improve error message #260

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Feb 10, 2024

  1. API error: improve error message

    Previously, a generic error would be returned:
    ```
    Error: unexpected HTTP status 404 Not Found
    ```
    
    This does not convey much information as to what happens.
    On the current version of dkregistry, one would hit this when trying to
    access s390x/ubuntu on registry-1.docker.io.
    
    This change specializes the error to surface more information as to why the
    error is happening as described in the OCI Distribution Specification:
    https://github.com/opencontainers/distribution-spec/blob/main/spec.md#error-codes
    
    In this specific case, the error would look like:
    ```
    Error: Api Error: ((MANIFEST_UNKNOWN), message: OCI manifest found, but accept header does not support OCI manifests)
    
    Caused by:
        ((MANIFEST_UNKNOWN), message: OCI manifest found, but accept header does not support OCI manifests)
    ```
    
    which clearly highlight that dkregistry does not support OCI manifest.
    chantra committed Feb 10, 2024
    Configuration menu
    Copy the full SHA
    8b2f432 View commit details
    Browse the repository at this point in the history