Stripe call is hanging

This call

      const accountLink = await stripe.accountLinks.create({
        account: user.stripeAccountId,
        refresh_url: process.env.WEBSITE_URL,
        return_url: process.env.WEBSITE_URL,
        type: 'account_onboarding',
      })

That works locally, seem to be the reason why my serverless function hangs on Layer0, do you see any reason why?

Can you list the version of Layer0 you are using? Also, do you have Deep Request Inspection enabled by chance? Feel free to DM me a URL to your build and I’d be happy to inspect further.

Hi Tristan! I think you did help me set that up:
yarn layer0 use 4.17.1-next-1658778369-78832ded2.0
This is the repo I’m installing

And I would DM you, but can’t find how to :grimacing:

No problem, I sent a DM to you.

Upon further review of the issue, I was able to inspect the API request using the Deep Request Inspection utility and found that the request was timing out due to a missing module trying to be required when running in serverless. The requested module is in a sub-directory of api/dist/functions of the RedwoodJS bundle and the Edgio connector for RW was not including files within sub-directories.

I will need to update the connector to fix this issue. In the meantime, you can modify layer0.config.js and add:

includeFiles: {
  'api/dist/functions/**/*': true,
},

to ensure all API functions are added to the serverless bundle when deployed.