© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Search
Star
Feedback
Setup for Free
S
Supabase
•
5mo ago
•
68 replies
david_eason
I got 'TypeError: fetch failed'
const supabaseAdmin
= createClient
(
supabaseUrl
,
supabaseServiceKey
,
{
auth
:
{
persistSession
: false
,
autoRefreshToken
: false
,
}
,
}
)
;
const
{ data
: testConnection
, error
: connectionError
}
= await supabaseAdmin
.from
(
'users
'
)
.select
(
'id
'
)
.limit
(1
)
;
if
(connectionError
)
{
console
.error
(
'Supabase connection
e
r
r
o
r
:
'
, connectionError
)
;
return NextResponse
.json
(
{ error
:
'Database connection failed
. Please ensure Supabase is running
.
'
}
,
{ status
: 503
}
)
;
}
This is my code
.
but when I try to run this
, I got the error
.
message: 'TypeError: fetch failed',
message: 'TypeError: fetch failed',
How can I fix this problem
?
Any help is thanks
.
thanks
.
Supabase
Join
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Similar Threads
Was this page helpful?
Yes
No
Recent Announcements
Next page
Similar Threads
TypeError: fetch failed
S
Supabase / help-and-questions
3y ago
Getting an error: "TypeError: Failed to fetch"
S
Supabase / help-and-questions
3y ago
Fetch Failed
S
Supabase / help-and-questions
13mo ago
Failed to fetch?
S
Supabase / help-and-questions
3mo ago