D1 binding lost when passed as param?

Hi, I have a weird situation. I have a D1 binding in a Nuxt API event handler. I'm passing the binding as a parameter to a function outside the event handler. This works fine locally, but when deployed to production, the function execution just stops (no exceptions, logs whatsoever) after accessing the binding from the function. I'm using drizzle to query D1. If I keep all the code in the event handler, it works in production as well. Any idea?
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server