mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-18 22:57:38 +01:00
Merge pull request #7580 from wy65701436/remove-workaround-500
Remove the workaround for checking chart existence
This commit is contained in:
commit
c9f2bf36eb
@ -130,13 +130,6 @@ func (a *adapter) ChartExist(name, version string) (bool, error) {
|
||||
if httpErr, ok := err.(*common_http.Error); ok && httpErr.Code == http.StatusNotFound {
|
||||
return false, nil
|
||||
}
|
||||
// TODO this is a workaround for https://github.com/goharbor/harbor/issues/7171
|
||||
if httpErr, ok := err.(*common_http.Error); ok && httpErr.Code == http.StatusInternalServerError {
|
||||
if strings.Contains(httpErr.Message, "no chart name found") ||
|
||||
strings.Contains(httpErr.Message, "No chart version found") {
|
||||
return false, nil
|
||||
}
|
||||
}
|
||||
return false, err
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user