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

Clarify multiple multiple-error semantics #413

Open
rogpeppe opened this issue May 21, 2023 · 2 comments
Open

Clarify multiple multiple-error semantics #413

rogpeppe opened this issue May 21, 2023 · 2 comments

Comments

@rogpeppe
Copy link
Contributor

The error-codes section allows for multiple errors to be returned, but doesn't clarify how the client should interpret such a return. For example, there might be several different error codes. What if they conflict?

Do any registries return multiple error codes in the real world, and if so, under what circumstances?

@sudo-bmitch
Copy link
Contributor

I suspect a lot of clients throw up their hands and return the error back to the user or logs. I'm only using the http status codes for my own client logic.

@sudo-bmitch
Copy link
Contributor

sudo-bmitch commented Jul 1, 2023

Here's an example response from distribution/distribution when pushing a manifest list without first pushing the manifests:

{"errors":[
  {"code":"MANIFEST_BLOB_UNKNOWN","message":"blob unknown to registry","detail":"sha256:600cac71919fc686481c9c1d652c493c630ceeb13d207f9ae8c0a7bb9fde4a71"},
  {"code":"MANIFEST_BLOB_UNKNOWN","message":"blob unknown to registry","detail":"sha256:cbb9856571c5127304224b528345cb3a5ea5caf13e7cedfa8c1e6bb9f8414156"},
  {"code":"MANIFEST_BLOB_UNKNOWN","message":"blob unknown to registry","detail":"sha256:52a873d6833e53105450c58321a19677433c74740a81d3a55310a99889b9cb9e"},
  {"code":"MANIFEST_BLOB_UNKNOWN","message":"blob unknown to registry","detail":"sha256:01d6fd6646fed9e6781c953ff80652ce8979a79b1c61cb36a07e240167341f32"},
  {"code":"MANIFEST_BLOB_UNKNOWN","message":"blob unknown to registry","detail":"sha256:361e6c3e59da161f15fd59b68df876e3346e7e043277f4ebdb13bfe7f23aeab6"}
]}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants