Skip to content

fix(postgrest): surface helpful hint for browser DNS failures (ERR_NA…#2448

Open
Tanusree-samanta wants to merge 1 commit into
supabase:masterfrom
Tanusree-samanta:fix/browser-dns-error-hint
Open

fix(postgrest): surface helpful hint for browser DNS failures (ERR_NA…#2448
Tanusree-samanta wants to merge 1 commit into
supabase:masterfrom
Tanusree-samanta:fix/browser-dns-error-hint

Conversation

@Tanusree-samanta

Copy link
Copy Markdown

Summary

Fixes missing error context for ERR_NAME_NOT_RESOLVED and other DNS
failures in browser environments (Chrome, Firefox, Safari).

Relates to: supabase/supabase#46821

Problem

In browsers, DNS failures produce a plain TypeError with no .cause
and no error code — just the message string. supabase-js currently
returns this as an opaque stack trace with no actionable guidance.

  • Chrome/Edge: Failed to fetch
  • Firefox: NetworkError when attempting to fetch resource.
  • Safari: Load failed

Solution

Detect these three browser network-failure messages and populate
error.hint with a developer-friendly message pointing to:

  1. The likely root cause (DNS / project URL)
  2. The Supabase dashboard (to verify project status)
  3. The Supabase status page for outages

Testing

3 new test.each cases added to fetch-errors.test.ts, one per browser.
No behaviour change for Node.js paths or non-DNS errors.

@Tanusree-samanta Tanusree-samanta requested review from a team as code owners June 14, 2026 17:07
@pkg-pr-new

pkg-pr-new Bot commented Jun 15, 2026

Copy link
Copy Markdown

Open in StackBlitz

@supabase/auth-js

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

@supabase/functions-js

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

@supabase/postgrest-js

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

@supabase/realtime-js

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

@supabase/storage-js

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

@supabase/supabase-js

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

commit: 539a885

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant