From f55ff98364b615dc194132693199ff9af605f09f Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Tue, 20 Oct 2020 16:04:18 +0100 Subject: [PATCH] Review comments and making sure errors get passed through correctly. --- packages/server/src/api/controllers/deploy/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/server/src/api/controllers/deploy/index.js b/packages/server/src/api/controllers/deploy/index.js index b666744372..ceae868749 100644 --- a/packages/server/src/api/controllers/deploy/index.js +++ b/packages/server/src/api/controllers/deploy/index.js @@ -47,7 +47,7 @@ async function checkAllDeployments(deployments, user) { } catch (err) { // system may have restarted, need to re-verify if ( - err != null && + err !== undefined && err.code === "InvalidClientTokenId" && deployment.quota ) { @@ -59,6 +59,8 @@ async function checkAllDeployments(deployments, user) { deployment.cfDistribution, deployment.invalidationId ) + } else { + throw err } } if (complete) {