Skip to content

Commit

Permalink
disabled retry on useInstitutionDetails
Browse files Browse the repository at this point in the history
  • Loading branch information
shindigira committed Sep 27, 2024
1 parent 19836ce commit 55a2751
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/utils/useInstitutionDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useQuery } from '@tanstack/react-query';
import { fetchInstitutionDetails } from 'api/requests';
import useSblAuth from 'api/useSblAuth';
import type { InstitutionDetailsApiType } from 'types/formTypes';
import { Five, One, STANDARD_TIMEOUT, Thirty, Two } from 'utils/constants';
import { One, STANDARD_TIMEOUT, Thirty, Two } from 'utils/constants';

/* Used for checking for Validations */
const useInstitutionDetails = (
Expand All @@ -15,7 +15,8 @@ const useInstitutionDetails = (
queryKey: [`fetch-institution`, lei],
queryFn: async (): Promise<InstitutionDetailsApiType> =>
fetchInstitutionDetails(auth, lei),
retry: Five,
// retry: Five,
retry: 0, // will need to be set by env variable
retryDelay: attempt =>
Math.min(
attempt > One ? Two ** attempt * STANDARD_TIMEOUT : STANDARD_TIMEOUT,
Expand Down

0 comments on commit 55a2751

Please sign in to comment.