[cause]: Invalid URL by using supabase recommend jabvascript snippet #32913
christonomous
started this conversation in
General
Replies: 2 comments
-
Are you sure the error is coming from Supabase code? The trace does not mention any Supabase thing. Your url is correctly formed. Is the error occuring on createClient or later? |
Beta Was this translation helpful? Give feedback.
0 replies
-
nice hint. Thank you. This is interesting. If I uncomment the error handler, it works - but error handling is removed import { createClient } from '@supabase/supabase-js'
const supabaseUrl = 'https://wnyjcdcusyepqduaoqhq.supabase.co'
const supabaseKey = process.env.SUPABASE_KEY
const supabase = createClient(supabaseUrl, supabaseKey)
// if (error) throw createError({ statusCode: 500, message: error.message }) My approach with error handling seeems to be wrong |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
By using the javascript code given by supabase dashboard itself I get the error:
I have use this JS snippet shown in my project dahasbord:
I am using supabase-js 2.47.16
I have console logged the key and its correct. Why do I get this error simply using your recommend code from dashboard. I have not complicated implementation. The URL is hardcoded! How can this be incorrect? The project is NOT set on pause in supabase projects.
Beta Was this translation helpful? Give feedback.
All reactions