Fix error handling

This commit is contained in:
Girish Ramakrishnan
2019-10-23 09:53:46 -07:00
parent e2388b7d88
commit e1f0d12251

View File

@@ -387,9 +387,12 @@ function deleteContainer(containerId, callback) {
container.remove(removeOptions, function (error) {
if (error && error.statusCode === 404) return callback(null);
if (error) debug('Error removing container %s : %j', containerId, error);
if (error) {
debug('Error removing container %s : %j', containerId, error);
return callback(new BoxError(BoxError.DOCKER_ERROR, error));
}
callback(new BoxError(BoxError.DOCKER_ERROR, error));
callback(null);
});
}