From dd4eccf61823903b5d25a6a9e1d852aa35e534cb Mon Sep 17 00:00:00 2001
From: Rhys Arkins <rhys@arkins.net>
Date: Wed, 19 Jun 2019 11:42:10 +0200
Subject: [PATCH] fix(presets): pass platform-failure up

---
 lib/config/presets.js | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/lib/config/presets.js b/lib/config/presets.js
index 098d751c3d..d5f4f733a6 100644
--- a/lib/config/presets.js
+++ b/lib/config/presets.js
@@ -47,6 +47,13 @@ async function resolveConfigPresets(
         try {
           fetchedPreset = await getPreset(preset);
         } catch (err) {
+          // istanbul ignore if
+          if (
+            err.message === 'platform-failure' ||
+            err.message === 'registry-failure'
+          ) {
+            throw err;
+          }
           const error = new Error('config-validation');
           if (err.message === 'dep not found') {
             error.validationError = `Cannot find preset's package (${preset})`;
@@ -55,11 +62,6 @@ async function resolveConfigPresets(
             error.validationError = `Preset package is missing a renovate-config entry (${preset})`;
           } else if (err.message === 'preset not found') {
             error.validationError = `Preset name not found within published preset config (${preset})`;
-          } else {
-            /* istanbul ignore next */ // eslint-disable-next-line
-            if (err.message === 'registry-failure') {
-              throw err;
-            }
           }
           // istanbul ignore if
           if (existingPresets.length) {
-- 
GitLab