Skip to content

Registry client treats non-JSON error response bodies as "unexpected"Β #3962

@corhere

Description

@corhere

For better or worse, the OCI Distribution Spec states that

A 4XX response code from the registry MAY return a body in any format.

And unhelpfully, it doesn't mandate that the registry include a Content-type header with the error response.

The registry client unconditionally tries to parse error responses as JSON, returning an UnexpectedHTTPResponseError if parsing fails. It should expect non-JSON response bodies as conformant registries are permitted to send them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions