forked from Shared/esg
Add health check and retry logic and circuit breaker
This commit is contained in:
@@ -2,4 +2,19 @@ export enum InquiryStatus {
|
||||
SUCCESS = 'SUCCESS',
|
||||
FAILURE = 'FAILURE',
|
||||
PARTIAL = 'PARTIAL',
|
||||
/** A valid provider response with no matching business record. */
|
||||
NO_MATCH = 'NO_MATCH',
|
||||
}
|
||||
|
||||
export const NO_MATCH_ERROR_CODES = [
|
||||
'INQUIRY_NO_MATCH',
|
||||
'CAR_POLICY_NOT_FOUND',
|
||||
'RECORD_NOT_FOUND',
|
||||
'REAL_ESTATE_NOT_FOUND',
|
||||
'SHAHKAR_NO_MATCH',
|
||||
'SHEBA_MISMATCH',
|
||||
] as const;
|
||||
|
||||
export function isNoMatchErrorCode(code?: string): boolean {
|
||||
return Boolean(code && NO_MATCH_ERROR_CODES.includes(code as (typeof NO_MATCH_ERROR_CODES)[number]));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user