From 5e945db7078b952b7ac7a0c7c8d87e23b37c1ba0 Mon Sep 17 00:00:00 2001 From: Rhys Arkins <rhys@arkins.net> Date: Thu, 23 Jul 2020 14:23:26 +0200 Subject: [PATCH] fix(presets): pass rate limit up --- lib/config/presets/index.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/config/presets/index.ts b/lib/config/presets/index.ts index 38ebddb94e..5c51bb4b2b 100644 --- a/lib/config/presets/index.ts +++ b/lib/config/presets/index.ts @@ -1,5 +1,8 @@ import is from '@sindresorhus/is'; -import { CONFIG_VALIDATION } from '../../constants/error-messages'; +import { + CONFIG_VALIDATION, + PLATFORM_RATE_LIMIT_EXCEEDED, +} from '../../constants/error-messages'; import { logger } from '../../logger'; import { ExternalHostError } from '../../types/errors/external-host-error'; import { regEx } from '../../util/regex'; @@ -207,6 +210,10 @@ export async function resolveConfigPresets( if (err instanceof ExternalHostError) { throw err; } + // istanbul ignore if + if (err.message === PLATFORM_RATE_LIMIT_EXCEEDED) { + throw err; + } const error = new Error(CONFIG_VALIDATION); if (err.message === 'dep not found') { error.validationError = `Cannot find preset's package (${preset})`; -- GitLab