Lovable: “Edge Function returned a non-2xx status code”
What it means
The Supabase Edge Function crashed or rejected the call, often because a secret (API key) isn't set.
How to fix it
Open Supabase > Edge Functions > Logs, read the real error, and add missing secrets in the Secrets panel.
Paste this into Lovable
Stop retrying previous fixes. I'm getting this error: "Edge Function returned a non-2xx status code". Likely cause: The Supabase Edge Function crashed or rejected the call, often because a secret (API key) isn't set. Before editing, show me the relevant files and confirm the root cause. Then: Open Supabase > Edge Functions > Logs, read the real error, and add missing secrets in the Secrets panel. Change only what's necessary, don't delete working code, don't add new libraries unless required, and tell me exactly what you changed and how to verify it.
Your error's a bit different? Paste it and get a fix prompt written for your exact case.
Get my fix prompt — 3 free