Skip to content

parity(postgrest): add URL length validation and timeout protection [from supabase-js] #235

Closed

Description

@grdsdev

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: 7ec2df9
  • PR: #2078
  • Module: postgrest
  • Type: new-feature

What Changed

Two new configuration options were added to PostgrestClient:

  1. timeout (optional): Timeout in milliseconds. Requests auto-abort after this duration.
  2. urlLengthLimit (default: 8000): Maximum URL length before warning/error.

Code Reference

export default class PostgrestClient {
  urlLengthLimit: number

  constructor(url: string, {
    timeout,
    urlLengthLimit = 8000,
  })
}

Implementation Guidance

Expected API Surface (C#)

public class ClientOptions
{
    public TimeSpan? Timeout { get; set; }        // NEW
    public int UrlLengthLimit { get; set; } = 8000; // NEW
}

Key Behaviors to Match

  • Timeout: Use CancellationTokenSource with timeout for auto-cancellation
  • UrlLengthLimit: Defaults to 8000. Validates URL before request
  • Both propagated from SupabaseClient to Postgrest client
  • PascalCase per C# conventions

Acceptance Criteria

  • Timeout option added to ClientOptions
  • UrlLengthLimit option added with default of 8000
  • URL length validation before request execution
  • Timeout cancels requests via CancellationToken
  • Unit tests cover both features
  • Documentation updated

Context

  • supabase-js version: v2.95.3
  • Parity tracking: This issue was auto-generated by SDK parity analysis
  • Related parity issues: SDK-698 (dart), SDK-699 (py), SDK-700 (swift)

Generated with Claude Code /sync-sdk-parity

Activity

  1. added
    feature
    on Feb 16, 2026
  2. self-assigned this
    on Jul 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

featureparity

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions