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
ErrorInfo
detail field is object in registry responses
#59
Comments
Considering that the exact wording of the spec is
the most correct (but not the most convenient) way would be to expose a Json type like this:
and then you have to match to know what you got. Serde already defines such a value but we should probably define our own, because it would be visible in our public api and so on...on the other hand we could just take care that the detail field can be serialized to a string and then it is up to the consumer to handle it. Thoughts? |
I don't know which approach is the best to go with, but I could implement and submit pull request for whichever turns out to be the best. |
@petkovicdanilo Then I suggest we do the simple thing and ensure that the detail field is properly deserialized as a string. Do you want do it? |
Yeah, sure. I can try to do that. |
Although spec says that
detail
field inErrorInfo
is string with unstructured data it seems that all registries makedetail
field an object.For example, Dockerhub returns this for unknown manifest:
Quay:
Microsoft's MCR :
This results in failure to deserialize any of the above
ErrorResponse
structs.Is this the problem of registry implementers, this library or the spec itself?
The text was updated successfully, but these errors were encountered: