opencontainers / distribution-spec

OCI Distribution Specification
https://opencontainers.org
Apache License 2.0
792 stars 199 forks source link

Error code requirement seems too strict #418

Open rogpeppe opened 1 year ago

rogpeppe commented 1 year ago

The section on error codes states the following:

The code field MUST be one of the following:

The set of codes provided doesn't seem comprehensive enough to cover the many possible kinds of error that might happen. For example, what is error code can a server use if it fails to access a backend data store for some reason? Or if it can't parse a numeric query parameter?

The docker registry itself uses an UNKNOWN error code for errors that it can't categorize. I'd suggest adding that to the list of possible error codes, and also potentially providing some registration scheme for error codes so it's possible to extend the set by mutual agreement.