Print error for failed HTTP auth request.#1249
Print error for failed HTTP auth request.#1249stevvooe merged 3 commits intodistribution:masterfrom k4leung4:print-error-msg
Conversation
Signed-off-by: Kenny Leung <[email protected]>
|
Code LGTM. @k4leung4 Any tests for this? |
registry/client/auth/session.go
Outdated
There was a problem hiding this comment.
Seems odd to throw away a nicely typed error for a formatted string here. Perhaps any additional messaging about failure to fetch a token should be left to the caller.
|
FYI, he's on vacation this week. I will ping him Monday. :) |
|
Thanks @mattmoor |
Signed-off-by: Kenny Leung <[email protected]>
…ution into print-error-msg Changed to use typed error instead of formatted string. Added tests for new public method. Signed-off-by: Kenny Leung <[email protected]>
|
Changed to make use of typed error instead of formatted string. please take another look. |
Current coverage is
|
|
LGTM |
|
Anything left needed to merge this? I ask in part because of the upcoming code freeze. |
|
LGTM |
|
CI is back, lets turn this green then merge 😉 |
Print error for failed HTTP auth request.
distribution#1249 changed token fetching to parse HTTP error response bodies as serialized errcodes. However, Docker Hub's authentication endpoint does not return error bodies in this format. To work around this, convert its format into ErrCodeUnauthorized or ErrCodeUnknown. Signed-off-by: Aaron Lehmann <[email protected]>
distribution#1249 changed token fetching to parse HTTP error response bodies as serialized errcodes. However, Docker Hub's authentication endpoint does not return error bodies in this format. To work around this, convert its format into ErrCodeUnauthorized or ErrCodeUnknown. Signed-off-by: Aaron Lehmann <[email protected]>
Print error for failed HTTP auth request.
distribution#1249 changed token fetching to parse HTTP error response bodies as serialized errcodes. However, Docker Hub's authentication endpoint does not return error bodies in this format. To work around this, convert its format into ErrCodeUnauthorized or ErrCodeUnknown. Signed-off-by: Aaron Lehmann <[email protected]>
Print error for failed HTTP auth request.
distribution#1249 changed token fetching to parse HTTP error response bodies as serialized errcodes. However, Docker Hub's authentication endpoint does not return error bodies in this format. To work around this, convert its format into ErrCodeUnauthorized or ErrCodeUnknown. Signed-off-by: Aaron Lehmann <[email protected]>
distribution#1249 changed token fetching to parse HTTP error response bodies as serialized errcodes. However, Docker Hub's authentication endpoint does not return error bodies in this format. To work around this, convert its format into ErrCodeUnauthorized or ErrCodeUnknown. Signed-off-by: Aaron Lehmann <[email protected]>
distribution/distribution#1249 changed token fetching to parse HTTP error response bodies as serialized errcodes. However, Docker Hub's authentication endpoint does not return error bodies in this format. To work around this, convert its format into ErrCodeUnauthorized or ErrCodeUnknown. Signed-off-by: Aaron Lehmann <[email protected]>
distribution/distribution#1249 changed token fetching to parse HTTP error response bodies as serialized errcodes. However, Docker Hub's authentication endpoint does not return error bodies in this format. To work around this, convert its format into ErrCodeUnauthorized or ErrCodeUnknown. Signed-off-by: Aaron Lehmann <[email protected]>
distribution/distribution#1249 changed token fetching to parse HTTP error response bodies as serialized errcodes. However, Docker Hub's authentication endpoint does not return error bodies in this format. To work around this, convert its format into ErrCodeUnauthorized or ErrCodeUnknown. Signed-off-by: Aaron Lehmann <[email protected]>
In the case of a failed HTTP auth token request, in addition to the current message that is returned, also return the error message in the response. This is to provide the user with a more descriptive message about what went wrong.
Signed-off-by: Kenny Leung [email protected]