provide suggestion as part of the error

This commit is contained in:
Girish Ramakrishnan
2019-10-27 12:01:30 -07:00
parent 09fce1978e
commit 12d233c5f9

View File

@@ -124,7 +124,7 @@ function pullImage(manifest, callback) {
// Use docker CLI here to support downloading of private repos. for dockerode, we have to use
// https://github.com/apocas/dockerode#pull-from-private-repos
docker.pull(manifest.dockerImage, function (error, stream) {
if (error) return callback(new BoxError(BoxError.DOCKER_ERROR, 'Unable to pull image. statusCode: ' + error.statusCode));
if (error) return callback(new BoxError(BoxError.DOCKER_ERROR, 'Unable to pull image. Please check the network or if the image needs authentication. statusCode: ' + error.statusCode));
// https://github.com/dotcloud/docker/issues/1074 says each status message
// is emitted as a chunk