daemon: return an InvalidParameter error when ep settings are wrong
Since v25.0 (commit ff50388
), we validate endpoint settings when
containers are created, instead of doing so when containers are started.
However, a container created prior to that release would still trigger
validation error at start-time. In such case, the API returns a 500
status code because the Go error isn't wrapped into an InvalidParameter
error. This is now fixed.
Signed-off-by: Albin Kerouanton <albinker@gmail.com>
This commit is contained in:
parent
e5dbe10e65
commit
fcc651972e
1 changed files with 1 additions and 1 deletions
|
@ -645,7 +645,7 @@ func (daemon *Daemon) updateNetworkConfig(container *container.Container, n *lib
|
|||
}
|
||||
|
||||
if err := validateEndpointSettings(n, n.Name(), endpointConfig); err != nil {
|
||||
return err
|
||||
return errdefs.InvalidParameter(err)
|
||||
}
|
||||
|
||||
if updateSettings {
|
||||
|
|
Loading…
Add table
Reference in a new issue