From 0a62f028cf4a2d0b51f4e7eb845913387ddf1045 Mon Sep 17 00:00:00 2001 From: David Kong Date: Tue, 15 Sep 2020 16:05:48 -0400 Subject: [PATCH] Fix error handling to handle new errors, apparently. --- bootstrap.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bootstrap.js b/bootstrap.js index 40da66c..b62cc9e 100644 --- a/bootstrap.js +++ b/bootstrap.js @@ -234,6 +234,9 @@ module.exports = class BootstrapPlugin { if (e.statusCode === 404) { return true; } + if (e.providerError && e.providerError.statusCode === 404) { + return true; + } throw new Error('AWS Request Error determining if bootstrap resources bucket exists'); }) .then(create => { @@ -272,6 +275,9 @@ module.exports = class BootstrapPlugin { if (e.statusCode === 404) { return true; } + if (e.providerError && e.providerError.statusCode === 404) { + return true; + } throw new Error('AWS Request Error determining if bootstrap resource already uploaded'); }) .then(upload => {