mirror of https://github.com/portainer/portainer
fix(docker/volumes): return 409 on volume conflict [EE-6748] (#11691)
parent
a808f83e7d
commit
42d9dfba36
|
@ -150,7 +150,9 @@ func (transport *Transport) decorateVolumeResourceCreationOperation(request *htt
|
||||||
|
|
||||||
_, err = cli.VolumeInspect(context.Background(), volumeID)
|
_, err = cli.VolumeInspect(context.Background(), volumeID)
|
||||||
if err == nil {
|
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")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue