|
@@ -641,11 +641,10 @@ func pullModelManifest(ctx context.Context, mp ModelPath, regOpts *registryOptio
|
|
headers := make(http.Header)
|
|
headers := make(http.Header)
|
|
headers.Set("Accept", "application/vnd.docker.distribution.manifest.v2+json")
|
|
headers.Set("Accept", "application/vnd.docker.distribution.manifest.v2+json")
|
|
resp, err := makeRequestWithRetry(ctx, http.MethodGet, requestURL, headers, nil, regOpts)
|
|
resp, err := makeRequestWithRetry(ctx, http.MethodGet, requestURL, headers, nil, regOpts)
|
|
- if err != nil {
|
|
|
|
- if errors.Is(err, os.ErrNotExist) {
|
|
|
|
- // The model was not found on the remote registry
|
|
|
|
- return nil, fmt.Errorf("%w: %s", ErrRemoteModelNotFound{}, err)
|
|
|
|
- }
|
|
|
|
|
|
+ if errors.Is(err, os.ErrNotExist) {
|
|
|
|
+ // The model was not found on the remote registry
|
|
|
|
+ return nil, fmt.Errorf("%w: %s", ErrRemoteModelNotFound{}, err)
|
|
|
|
+ } else if err != nil {
|
|
return nil, err
|
|
return nil, err
|
|
}
|
|
}
|
|
defer resp.Body.Close()
|
|
defer resp.Body.Close()
|