mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-20 23:57:42 +01:00
Merge pull request #7456 from yuanshuhan/replication_ng
fix a small issue, that if there is no manifest in huawei image repos…
This commit is contained in:
commit
3c1be645bf
@ -98,6 +98,9 @@ func (a *adapter) ManifestExist(repository, reference string) (exist bool, diges
|
|||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
code := resp.StatusCode
|
code := resp.StatusCode
|
||||||
if code >= 300 || code < 200 {
|
if code >= 300 || code < 200 {
|
||||||
|
if code == 404 {
|
||||||
|
return false, digest, nil
|
||||||
|
}
|
||||||
body, _ := ioutil.ReadAll(resp.Body)
|
body, _ := ioutil.ReadAll(resp.Body)
|
||||||
return exist, digest, fmt.Errorf("[%d][%s]", code, string(body))
|
return exist, digest, fmt.Errorf("[%d][%s]", code, string(body))
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user