parity(postgrest): add automatic retries for transient errors [from supabase-js]
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
[!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)
- Commit:
ea3e086c - PR: https://github.com/supabase/supabase-js/pull/2072
- Module: postgrest
- Type: new-feature
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: Nheader on retried requests
Files Likely Affected
Postgrest/Client.csorPostgrest/Table.cs- add retry to HTTP request logicPostgrest/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-countheader 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
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from supabase/supabase-csharp
-
OAuth State Error for social providers since Supabase.Gotrue v6.1.0May be free again @Tr00d claimed this 47 days ago, and no pull request is open. Openbug
supabase/supabase-csharp#377 · 4 comments · 1 assignee ·
Maintainers usually reply within 1 day
-
Postgres Changes filters are validated as anon because SetAuth is applied after channel joinMay be free again @Tr00d claimed this 60 days ago, and no pull request is open. Openarea: postgrest bug
supabase/supabase-csharp#345 · 1 comment · 1 assignee ·
Maintainers usually reply within 1 day
-
parity(functions): never send new-format API key as Authorization Bearer [from supabase-js]May be free again @Tr00d claimed this 85 days ago, and no pull request is open. Openbug parity
supabase/supabase-csharp#279 · 2 comments · 1 assignee ·
Maintainers usually reply within 1 day
-
parity(client): unrecognized sb_ API key subtypes are silently accepted, no warning [from supabase-js]May be free again @Tr00d claimed this 85 days ago, and no pull request is open. Openparity
supabase/supabase-csharp#278 · 2 comments · 1 assignee ·
Maintainers usually reply within 1 day
-
parity(realtime): add replication_ready broadcast option and system event payload [from supabase-js]May be free again @Tr00d claimed this 99 days ago, and no pull request is open. Openparity
supabase/supabase-csharp#272 · 1 assignee ·
Maintainers usually reply within 1 day
All issues in supabase/supabase-csharp
Similar issues
-
area:jobads-cv BE mvp P2
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
klasolsson81/jobbliggaren#2099 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
0 - Backlog Bug
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
BrighterCommand/Brighter#4581 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
Esri/calcite-dotnet-toolkit#30 · 1 reaction ·
-
kind:docs simplification size:S status:todo
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
elsa-workflows/elsa-foundation#2604 ·
Maintainers usually reply within 1 day