Originally posted by @euanh in #134
Trying to open an upload session with an invalid repository name causes registry:2 to respond with 404 response code and a plain text body of page not found.
ContainerRegistry tries to parse the body as JSON, fails, and prints a JSONDecoder error instead.
There error MAY contain a JSON body but there is no guarantee.   Ideally we should try to parse it but throw a generic error if we fail.
404 is an expected error outcome for the upload session endpoint, so it could also have a specific error instead of a generic one.