REST API unreliable when called from a Vercel edge function

Hello,
I use the REST api of supabase to insert a record into a table fetch(mySupabaseEndpoint, {method: "POST", headers, body}). It works when I run this function locally, but not when I deploy it to a Vercel edge function.

What is weird is that :
  • It's unpredictable, it works 1/4 of the time
  • there is no error or exception
  • I don't get result from the
    fetch
    , it hangs indefinitely. If I await fetch(...); console.log('hello'), the text hello is not displayed
I'm calling other API from this same Vercel edge function with no issue. Any idea what could be the problem here?
Was this page helpful?