Skip to content

fix(postgrest): restore non-Error abort detection in fetch catch - #2328

Merged
mandarini merged 1 commit into
developfrom
fix/postgrest-abort-non-error-rejections
May 7, 2026
Merged

mandarini merged 1 commit into
developfrom
fix/postgrest-abort-non-error-rejections

Conversation

@mandarini

Copy link
Copy Markdown
Contributor

The 2.105.2 narrowing to instanceof Error skipped the abort branch when serverless or realm-crossing fetch implementations reject with non-Error values, sending GETs into the retry loop and surfacing as silent data: null from .maybeSingle() (#2327).

Revert this catch to the 2.105.1 pattern (: any + optional chaining). JS allows throwing any value, so the binding here cannot be narrower than any. Add regression tests for plain-object rejections.

Closes #2327

@mandarini
mandarini requested review from a team as code owners May 6, 2026 10:58
@github-actions github-actions Bot added the postgrest-js Related to the postgrest-js library. label May 6, 2026
@mandarini
mandarini force-pushed the fix/postgrest-abort-non-error-rejections branch from 2f42b91 to afef6e2 Compare May 6, 2026 10:59
@pkg-pr-new

pkg-pr-new Bot commented May 6, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@supabase/auth-js

npm i https://pkg.pr.new/@supabase/auth-js@2328

@supabase/functions-js

npm i https://pkg.pr.new/@supabase/functions-js@2328

@supabase/postgrest-js

npm i https://pkg.pr.new/@supabase/postgrest-js@2328

@supabase/realtime-js

npm i https://pkg.pr.new/@supabase/realtime-js@2328

@supabase/storage-js

npm i https://pkg.pr.new/@supabase/storage-js@2328

@supabase/supabase-js

npm i https://pkg.pr.new/@supabase/supabase-js@2328

commit: afef6e2

@mandarini
mandarini merged commit 95c02f0 into develop May 7, 2026
24 checks passed
@mandarini
mandarini deleted the fix/postgrest-abort-non-error-rejections branch May 7, 2026 07:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

postgrest-js Related to the postgrest-js library.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Auth/postgrest regression in 2.105.2: SELECT query silently returns null in serverless runtime (Netlify Functions)

2 participants