Skip to content

Commit

Permalink
fix: retry status code
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierniki committed Nov 8, 2023
1 parent 8da9658 commit 526a9df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export async function graphqlFetch<TQuery, TVariables>({
)
const fetchWithRetry = async (repeats: number): Promise<Response> => {
const result = await throttledFetch()
if (result.status === 423 && repeats > 0) return await fetchWithRetry(repeats - 1)
if (result.status === 429 && repeats > 0) return await fetchWithRetry(repeats - 1)
return result
}

Expand Down

0 comments on commit 526a9df

Please sign in to comment.