Add health check and retry logic and circuit breaker

This commit is contained in:
SepehrYahyaee
2026-09-28 17:01:53 +03:30
parent 22371f4a03
commit 03fa5e0f20
67 changed files with 3101 additions and 410 deletions
+15
View File
@@ -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]));
}