Home / Function/ ErroredTableDetails() — supabase Function Reference

ErroredTableDetails() — supabase Function Reference

Architecture documentation for the ErroredTableDetails() function in ErroredTableDetails.tsx from the supabase codebase.

Entity Profile

Dependency Diagram

graph TD
  79dc0ee2_4633_1ee6_4102_4b286d14a390["ErroredTableDetails()"]
  d980996c_b650_1d1f_9cd4_bf8e0757708b["isValidRetryPolicy()"]
  79dc0ee2_4633_1ee6_4102_4b286d14a390 -->|calls| d980996c_b650_1d1f_9cd4_bf8e0757708b
  style 79dc0ee2_4633_1ee6_4102_4b286d14a390 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/studio/components/interfaces/Database/Replication/ErroredTableDetails.tsx lines 12–77

export const ErroredTableDetails = ({ table }: ErroredTableDetailsProps) => {
  const { ref: projectRef } = useParams()

  const state = table.state as Extract<ReplicationPipelineTableStatus['state'], { name: 'error' }>
  const tableName = table.table_name
  const retryPolicy = state.retry_policy.policy

  if (!isValidRetryPolicy(state.retry_policy)) {
    return (
      <div
        role="region"
        className="flex flex-col gap-y-3"
        aria-label={`Error details for table ${tableName}`}
      >
        {state.solution && <div className="text-xs text-foreground-light">{state.solution}</div>}
        <div className="text-xs text-foreground-lighter">Invalid retry policy configuration</div>
      </div>
    )
  }

  return (
    <div role="region" aria-label={`Error details for table ${tableName}`}>
      {retryPolicy === 'no_retry' ? (
        <div className="flex flex-col gap-y-3">
          <p className="text-xs text-foreground-lighter">
            This error requires manual intervention from our{' '}
            <InlineLink
              className="text-foreground-lighter hover:text-foreground"
              href={`/support?projectRef=${projectRef}&category=dashboard_bug&subject=Database%20replication%20error&error=${state.reason}`}
            >
              support
            </InlineLink>
            . Alternatively, you may also recreate the pipeline. Use the table actions menu on the
            right to view the full error details.
          </p>
        </div>
      ) : retryPolicy === 'manual_retry' ? (
        <div className="flex flex-col gap-y-3">
          <div className="rounded-md border border-destructive-400 bg-destructive-100 px-3 py-3 space-y-2">
            <div className="flex items-start gap-x-2">
              <CriticalIcon />
              <div className="flex-1 text-xs text-destructive-900">
                <p className="font-semibold mb-1">Action required to continue replication</p>
                <p className="text-foreground-light">
                  {state.solution}
                  {state.solution && !/[.!?]$/.test(state.solution.trim()) && '.'}
                </p>
                <p className="text-foreground-light mt-2">
                  Restart table replication from the table actions menu on the right. The pipeline
                  will restart automatically.
                </p>
              </div>
            </div>
          </div>
        </div>
      ) : retryPolicy === 'timed_retry' ? (
        <div className="flex flex-col text-foreground-lighter gap-y-3">
          <p className="text-xs">
            Replication will retry automatically. The pipeline will restart to apply the retry.
          </p>
          <RetryCountdown nextRetryTime={state.retry_policy.next_retry} />
        </div>
      ) : null}
    </div>
  )
}

Subdomains

Frequently Asked Questions

What does ErroredTableDetails() do?
ErroredTableDetails() is a function in the supabase codebase.
What does ErroredTableDetails() call?
ErroredTableDetails() calls 1 function(s): isValidRetryPolicy.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free