mirror of
https://github.com/moby/moby.git
synced 2026-01-11 10:41:43 +00:00
Merge pull request #51717 from vvoland/c8d-errs-log
daemon/c8d: Log correct error extractOCIErrors
This commit is contained in:
@@ -26,7 +26,7 @@ func translateRegistryError(ctx context.Context, err error) error {
|
||||
var derr docker.Error
|
||||
if errors.As(err, &remoteErr) {
|
||||
if jerr := json.Unmarshal(remoteErr.Body, &derrs); jerr != nil {
|
||||
log.G(ctx).WithError(derrs).Debug("unable to unmarshal registry error")
|
||||
log.G(ctx).WithError(jerr).Debug("unable to unmarshal registry error")
|
||||
return fmt.Errorf("%w: %w", cerrdefs.ErrUnknown, err)
|
||||
}
|
||||
if len(derrs) == 0 && (remoteErr.StatusCode == http.StatusUnauthorized || remoteErr.StatusCode == http.StatusForbidden) {
|
||||
|
||||
Reference in New Issue
Block a user