From 9badd6515c68695271dcb7d9cac2c1fb57186c3c Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Fri, 2 Jun 2017 01:47:41 +0000 Subject: [PATCH] handle case that package doesn't load --- lib/apis.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/apis.js b/lib/apis.js index ca109b6..2b423fc 100644 --- a/lib/apis.js +++ b/lib/apis.js @@ -554,7 +554,7 @@ module.exports.create = function (xconfx, apiFactories, apiDeps) { }); // TODO cache permission (although the FS is already cached, NBD) - return isThisClientAllowedToUseThisPkg(xconfx, clientUrih, pkgId).then(function (yes) { + var promise = isThisClientAllowedToUseThisPkg(xconfx, clientUrih, pkgId).then(function (yes) { if (!yes) { notConfigured(req, res); return null; @@ -585,6 +585,7 @@ module.exports.create = function (xconfx, apiFactories, apiDeps) { }); } }); + rejectableRequest(req, res, promise, "[com.daplie.walnut] load api package"); }); }; };