From cac80871ff345039ac87b561844cc0e8a75c176b Mon Sep 17 00:00:00 2001 From: David Kong Date: Wed, 16 Sep 2020 14:06:08 -0400 Subject: [PATCH] Fix error handling to handle new errors, apparently. (#2) --- bootstrap.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bootstrap.js b/bootstrap.js index 393cd89..3b71af4 100644 --- a/bootstrap.js +++ b/bootstrap.js @@ -350,6 +350,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 => { @@ -388,6 +391,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 => {