Every failure the client reports carries one of these codes, so a caller
can branch on the class of failure without parsing messages.
INVALID_REFERENCE: the reference (or an OciReference built by hand)
does not follow the distribution grammar, or names an http: origin the
caller did not list as insecure.
NOT_FOUND: the registry answered 404.
UNAUTHORIZED: no usable credentials, or the registry still answered 401
after the client authenticated once.
DENIED: the registry (or its token service) answered 403, or a push
was refused with 401 DENIED / insufficient_scope after the client
authenticated.
DIGEST_MISMATCH: the received bytes do not hash to the expected digest,
or on push the registry reports (or rejects) a different digest.
SIZE_EXCEEDED: a body grew past its cap; the transfer was aborted.
UNSUPPORTED_MANIFEST: the manifest media type is not one of the four
this client understands.
PROTOCOL: the server broke the protocol (bad JSON, bad redirect, bad
Link, wrong size, ...).
NETWORK: fetch itself rejected.
TAG_EXISTS: a push would replace an existing tag and the caller did
not pass allowOverwrite.
Every failure the client reports carries one of these codes, so a caller can branch on the class of failure without parsing messages.
INVALID_REFERENCE: the reference (or anOciReferencebuilt by hand) does not follow the distribution grammar, or names anhttp:origin the caller did not list as insecure.NOT_FOUND: the registry answered 404.UNAUTHORIZED: no usable credentials, or the registry still answered 401 after the client authenticated once.DENIED: the registry (or its token service) answered 403, or a push was refused with 401DENIED/insufficient_scopeafter the client authenticated.DIGEST_MISMATCH: the received bytes do not hash to the expected digest, or on push the registry reports (or rejects) a different digest.SIZE_EXCEEDED: a body grew past its cap; the transfer was aborted.UNSUPPORTED_MANIFEST: the manifest media type is not one of the four this client understands.PROTOCOL: the server broke the protocol (bad JSON, bad redirect, badLink, wrong size, ...).NETWORK:fetchitself rejected.TAG_EXISTS: a push would replace an existing tag and the caller did not passallowOverwrite.