Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

parity(postgrest): add automatic retries for transient errors [from supabase-js]

Open
#243 0 comments 0 reactions 1 assignee View on GitHub

Maintainers usually reply within 1 day

@Tr00d is already working on this.

Since Jul 1, 2026.

Assessment

This issue has not been assessed yet.

Description

parity

[!WARNING]
Auto-generated by AI — This issue was automatically created by an AI-based SDK parity analysis tool. It may not be applicable to this SDK or may already be implemented in a different form. Please use your best judgment before accepting or closing this issue.

SDK Parity: C# implementation needed

A change was made in supabase-js that needs to be implemented in this repository for SDK parity.

Reference Implementation (supabase-js)

What Changed

Idempotent requests (GET, HEAD, OPTIONS) that fail with network errors or HTTP 503/520 are automatically retried with exponential backoff. Default: 3 retries at 1s, 2s, 4s. A retry option disables retries per-query. A x-retry-count header is sent on retried requests.

Code Reference
const DEFAULT_MAX_RETRIES = 3
const RETRYABLE_STATUS_CODES = [503, 520]
const RETRYABLE_METHODS = ['GET', 'HEAD', 'OPTIONS']
const getRetryDelay = (attempt: number) => Math.min(1000 * 2 ** attempt, 30000)
// delays: 1s, 2s, 4s, ... up to 30s

Implementation Guidance

Expected API Surface (C#)
// Retries enabled by default for GET requests on 503/520
var result = await client.From<Message>().Get();

// Disable retries for a specific query
var result = await client.From<Message>().WithRetry(false).Get();
Key Behaviors to Match
  • Only retry GET/HEAD (idempotent methods)
  • Only retry on network errors and HTTP 503, 520
  • Exponential backoff: 1s, 2s, 4s delays (max 30s)
  • Default max 3 retries
  • Option to disable per-query (WithRetry(false) or similar)
  • Send x-retry-count: N header on retried requests
Files Likely Affected
  • Postgrest/Client.cs or Postgrest/Table.cs - add retry to HTTP request logic
  • Postgrest/QueryOptions.cs - add retry option

Acceptance Criteria

  • GET requests auto-retry on 503/520 with exponential backoff
  • Non-GET methods (POST, PATCH, DELETE) do NOT retry
  • Per-query option to disable retries
  • x-retry-count header sent on retried requests
  • Max 3 retries by default
  • Unit tests: retry behavior, non-retry methods, disable option

Context

  • supabase-js version: v2.101.0
  • Parity tracking: This issue was auto-generated by SDK parity analysis

Generated with Claude Code /sync-sdk-parity

Dominant language
C#
Stars
702
Forks
106
Avg merge
2d 21h
Merged PRs (30d)
51

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from supabase/supabase-csharp

All issues in supabase/supabase-csharp

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.