From 96803093486a3de6a93a720338f0dc441dca5e02 Mon Sep 17 00:00:00 2001 From: Abhijith Nagaraja Date: Fri, 5 Feb 2021 12:52:53 -0800 Subject: [PATCH 1/2] Fixes Issues #186 and #200 This is an inspiration from the fix that @Enase provided long back and not merged. Tested in my local setup and works. Fixes issue #186 and #200 --- lib/stackInformation.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/stackInformation.js b/lib/stackInformation.js index 62479b6..7bce3c3 100644 --- a/lib/stackInformation.js +++ b/lib/stackInformation.js @@ -82,7 +82,14 @@ module.exports = { .mapSeries(stack => BbPromise.join(BbPromise.resolve(stack), this.aliasStackLoadTemplate(stack))) .map(stackInfo => ({ stack: stackInfo[0], template: stackInfo[1] })) .catch(err => { - if (err.statusCode === 400) { + if ( + err.statusCode === 400 || + ( + err.statusCode === undefined && + err.providerError && + err.providerError.statusCode === 400 + ) + ) { // The export is not yet there. Can happen on the very first alias stack deployment. return BbPromise.resolve([]); } From 7f60947cf829744ee20efb4adf7137ea4eb86541 Mon Sep 17 00:00:00 2001 From: Abhijith Nagaraja Date: Fri, 5 Feb 2021 12:53:03 -0800 Subject: [PATCH 2/2] Fixes Issues #186 and #200 This is an inspiration from the fix that @Enase provided long back and not merged. Tested in my local setup and works. Fixes issue #186 and #200