Skip to content

Commit

Permalink
feat(core): add ProviderFailure.Unhealthy
Browse files Browse the repository at this point in the history
This error to be thrown when methods called fail based on health state
  • Loading branch information
rhyslbw committed Mar 25, 2022
1 parent 1f8dc0f commit 98fb4a7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/core/src/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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})` : '');
Expand Down

0 comments on commit 98fb4a7

Please sign in to comment.