From 5b48856c9af54793e52394284a7363f85d25f0fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Carranza=20V=C3=A9lez?= Date: Wed, 11 Nov 2015 01:42:15 -0300 Subject: [PATCH] Bring back request - and show an error when talking to delta server fails --- src/docker-utils.coffee | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/docker-utils.coffee b/src/docker-utils.coffee index 17f5ff22..8eed2bb1 100644 --- a/src/docker-utils.coffee +++ b/src/docker-utils.coffee @@ -7,6 +7,8 @@ config = require './config' _ = require 'lodash' knex = require './db' +{ request } = require './request' + docker = Promise.promisifyAll(new Docker(socketPath: config.dockerSocket)) # Hack dockerode to promisify internal classes' prototypes Promise.promisifyAll(docker.getImage().constructor.prototype) @@ -56,7 +58,7 @@ exports.rsyncImageWithProgress = (imgDest, onProgress) -> onProgress(percentage: 100) .on 'response', (res) -> if res.statusCode isnt 200 - reject() + reject(new Error("Got #{res.statusCode} when requesting image from delta server.")) else resolve(res) .on 'error', reject