use of com.spotify.docker.client.exceptions.NetworkNotFoundException in project docker-client by spotify.
the class DefaultDockerClient method removeNetwork.
@Override
public void removeNetwork(String networkId) throws DockerException, InterruptedException {
try {
final WebTarget resource = resource().path("networks").path(networkId);
request(DELETE, resource, resource.request(APPLICATION_JSON_TYPE));
} catch (DockerRequestException e) {
switch(e.status()) {
case 404:
throw new NetworkNotFoundException(networkId, e);
default:
throw e;
}
}
}
Aggregations