diff --git a/api/http/proxy/factory/docker/volumes.go b/api/http/proxy/factory/docker/volumes.go index 1d8101321..5b60ea63a 100644 --- a/api/http/proxy/factory/docker/volumes.go +++ b/api/http/proxy/factory/docker/volumes.go @@ -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") } }