mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-18 22:57:38 +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()
|
||||
code := resp.StatusCode
|
||||
if code >= 300 || code < 200 {
|
||||
if code == 404 {
|
||||
return false, digest, nil
|
||||
}
|
||||
body, _ := ioutil.ReadAll(resp.Body)
|
||||
return exist, digest, fmt.Errorf("[%d][%s]", code, string(body))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user