From 98fb4a7ac85b0b1bde8977e1c8b6035e7d484cbf Mon Sep 17 00:00:00 2001 From: Rhys Bartels-Waller Date: Thu, 24 Mar 2022 16:23:38 +0100 Subject: [PATCH] feat(core): add ProviderFailure.Unhealthy This error to be thrown when methods called fail based on health state --- packages/core/src/errors.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/core/src/errors.ts b/packages/core/src/errors.ts index a621e88ee33..d69b77be73e 100644 --- a/packages/core/src/errors.ts +++ b/packages/core/src/errors.ts @@ -4,7 +4,8 @@ export enum ProviderFailure { NotFound = 'NOT_FOUND', Unknown = 'UNKNOWN', InvalidResponse = 'INVALID_RESPONSE', - NotImplemented = 'NOT_IMPLEMENTED' + NotImplemented = 'NOT_IMPLEMENTED', + Unhealthy = 'UNHEALTHY' } const formatMessage = (reason: string, detail?: string) => reason + (detail ? ` (${detail})` : '');