Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Commit 97ca087

Browse files
committed
remember to return an error when the HEAD response is not 200 OK
1 parent 3c8059f commit 97ca087

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

vfsutil/zip.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ func NewZipVFS(ctx context.Context, url string, onFetchStart, onFetchFailed func
3131
return nil, err
3232
}
3333
if response.StatusCode != http.StatusOK {
34-
return nil, nil
34+
return nil, fmt.Errorf("unable to fetch zip from %s (expected HTTP response code 200, but got %d)", url, response.StatusCode)
3535
}
3636

3737
fetch := func(ctx context.Context) (ar *archiveReader, err error) {

0 commit comments

Comments
 (0)