Add the mediaType to the error#30047
Conversation
|
This test needs to be updated |
|
@aaronlehmann fixed |
cli/command/image/pull.go
Outdated
There was a problem hiding this comment.
Perhaps the CLI should strip the mediatype here (and in the plugin case) to make the user-visible error less verbose.
I agree that having the mediatype in the general case is useful.
|
Can we focus this PR on just changing the message to include the media type when target is unknown, so |
|
I'd prefer we don't say the word "media type" to users. |
|
@stevvooe what would like it to say instead? |
|
@duglin It said |
|
@stevvooe see if you're ok with the new stuff |
There was a problem hiding this comment.
Aren't we fetching a plugin here?
There was a problem hiding this comment.
@stevvooe yea that is kind of funky - I tweaked it - see if this new one is any better.
|
@duglin Looks fine. There might be an inconsistency in the test. Added a comment. |
|
LGTM |
|
ping @tiborvass |
|
LGTM ping @tiborvass @anusha-ragunathan |
cli/command/image/pull.go
Outdated
There was a problem hiding this comment.
Is this correct? It doesn't seem consistent with the error generated by pullV2Tag.
|
I agree with @dmcgowan . Users dont need to be confused with |
|
@duglin what do you think about the last comments ? |
|
my concern with the word "target" is that is doesn't help someone know what's going on. "target" of what? At least "MediaType", to me, would indicate that some field in the metadata about the image is wrong. I would never have guess that "target" would refer to a field in the image. |
|
|
|
ok, I can live with "remote" more than "target" :-) will udpdate |
Without this fix the error the client might see is: target is unknown which wasn't helpful to me when I saw this today. With this fix I now see: MediaType is unknown: 'text/html' which helped me track down the issue to the registry I was talking to. Signed-off-by: Doug Davis <[email protected]>
|
ping @tiborvass @anusha-ragunathan for a final LGTM I think |
|
LGTM |
1 similar comment
|
LGTM |
Add the mediaType to the error
Without this fix the error the client might see is:
target is unknownwhich wasn't helpful to me when I saw this today. With this fix I
now see:
MediaType is unknown: 'text/html'which helped me track down the issue to the registry I was talking to.
Signed-off-by: Doug Davis [email protected]