mirror of
https://github.com/supabase/supabase.git
synced 2026-10-12 21:05:06 +03:00
* midway * Hook up connect tables e2e * Update isEnabled flag * Change connectingStep to enum * Nit * Nit * Nit * Only show replication status if theres a publication * Improve loading state in etl page * Refactor + Clean up + Add long poll logic when adding more tables
23 lines
513 B
TypeScript
23 lines
513 B
TypeScript
import { MAX_RETRY_FAILURE_COUNT } from 'data/query-client'
|
|
import { ResponseError } from 'types'
|
|
|
|
export const checkReplicationFeatureFlagRetry = (
|
|
failureCount: number,
|
|
error: ResponseError
|
|
): boolean => {
|
|
const isFeatureFlagRequiredError =
|
|
error instanceof ResponseError &&
|
|
error.code === 503 &&
|
|
error.message.includes('feature flag is required')
|
|
|
|
if (isFeatureFlagRequiredError) {
|
|
return false
|
|
}
|
|
|
|
if (failureCount < MAX_RETRY_FAILURE_COUNT) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|