From cddec3c515126c192ce82d04278a56ac61c6a59e Mon Sep 17 00:00:00 2001 From: Marak Date: Sun, 3 Dec 2017 16:15:36 -0500 Subject: [PATCH] [api] [fix] Ensure error is passed to client #14 --- lib/hook/deploy.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/hook/deploy.js b/lib/hook/deploy.js index 3d3f523..67c446f 100644 --- a/lib/hook/deploy.js +++ b/lib/hook/deploy.js @@ -19,6 +19,9 @@ module['exports'] = function Deploy (opts, cb) { } catch (err){ e = err; } + if (e) { + return cb(e); + } pkg.owner = config.user; self.get({ name: pkg.name, owner: config.user }, function (err, _hook) { if (err) {