Skip to content

Commit

Permalink
Merge pull request #12969 from rhatdan/remote
Browse files Browse the repository at this point in the history
Fix handling of duplicate matches on id expansion
  • Loading branch information
openshift-merge-robot authored Jan 25, 2022
2 parents 6d8507d + 80a5295 commit 95db13d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/api/handlers/utils/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,12 @@ func VolumeNotFound(w http.ResponseWriter, name string, err error) {
}

func ContainerNotFound(w http.ResponseWriter, name string, err error) {
if errors.Cause(err) != define.ErrNoSuchCtr {
switch errors.Cause(err) {
case define.ErrNoSuchCtr, define.ErrCtrExists:
Error(w, http.StatusNotFound, err)
default:
InternalServerError(w, err)
}
Error(w, http.StatusNotFound, err)
}

func ImageNotFound(w http.ResponseWriter, name string, err error) {
Expand Down

0 comments on commit 95db13d

Please sign in to comment.