Skip to content

Commit

Permalink
fix(docker/volumes): return 409 on volume conflict [EE-6748] (#11691)
Browse files Browse the repository at this point in the history
  • Loading branch information
chiptus committed May 15, 2024
1 parent a808f83 commit 42d9dfb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion api/http/proxy/factory/docker/volumes.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,9 @@ func (transport *Transport) decorateVolumeResourceCreationOperation(request *htt

_, err = cli.VolumeInspect(context.Background(), volumeID)
if err == nil {
return nil, errors.New("a volume with the same name already exists")
return &http.Response{
StatusCode: http.StatusConflict,
}, errors.New("a volume with the same name already exists")
}
}

Expand Down

0 comments on commit 42d9dfb

Please sign in to comment.