code: func continueOnError(err error, mirrorEndpoint bool) bool {
  	switch v := err.(type) {
  	case errcode.Errors:
  		if len(v) == 0 {
  			return true
  		}
  		return continueOnError(v[0], mirrorEndpoint)
  	case ErrNoSupport:
  		return continueOnError(v.Err, mirrorEndpoint)
  	case errcode.Error:
  		return mirrorEndpoint || shouldV2Fallback(v)
  	case *client.UnexpectedHTTPResponseError:
  		return true
  	case ImageConfigPullError:
  		// ImageConfigPullError only happens with v2 images, v1 fallback is
  		// unnecessary.
  		// Failures from a mirror endpoint should result in fallback to the
  		// canonical repo.
  		return mirrorEndpoint
  	case error:
  		return !strings.Contains(err.Error(), strings.ToLower(syscall.ESRCH.Error()))
  	}
  	// let's be nice and fallback if the error is a completely
  	// unexpected one.
  	// If new errors have to be handled in some way, please
  	// add them to the switch above.
  	return true
  }
docs: // continueOnError returns true if we should fallback to the next endpoint
  // as a result of this error.