Closed commandcenterio closed 10 months ago
I don't know if that's really the issue but I've heard bad things about using forEach with async/await: you can read more here. Maybe it helps to use an alternative.
@arthureberledev this indeed was the issue. everything works as expected now in prod. what an oversight on part. I really appreciate the suggestion here, I'd love to buy you a coffee or something. this was bugging me for weeks
@arthureberledev this indeed was the issue. everything works as expected now in prod. what an oversight on part. I really appreciate the suggestion here, I'd love to buy you a coffee or something. this was bugging me for weeks
Great to hear that! I have a buymeacoffee link but really, you don't have to buy me anything :D
Hello, I am facing an odd issue that is preventing us from releasing our application.
Problem
Using the
app/api/webhooks/route.ts
I am able to successfully capture the data from Stripe. The issue comes after I create a new value based on the data from stripe, I take that new value and try to insert it in a table in Supabase. I have usedcreateClient
from'@supabase/supabase-js'
to create a client using my service role key (i verified it is present in my env vars). I have logged out the class in prod and confirmed it is initialized w/ the correct keys.When I make a call to get data from a table in supabase the following happens:
Our current code works perfectly fine locally, these issues are only present in production. This is our last blocker before we release. Any help would be greatly appreciated.
My route.ts:
the error happens from:
which is called in
updateSupportHours
Here is the
updateSupportHours()
: