Code that runs successfully locally fails when executed in an edge function - Supabase