Starter: 539 UserCodeTimeoutError error when transformResponse is present

I’m getting the following error on my site pages whenever I add transformResponse to proxy:

{
    "error": "UserCodeTimeoutError error"
}

Even if my transformResponse is just a simple log:

  proxy('origin', {
    transformResponse: (response) => {
      console.info('response.body:', response.body)
    },
  })

XDN version: 2.46.3

Has anyone been facing the issue like this before?

I created a new XDN starter app with the latest version (2.46.3) and modified my proxy response with the same code you provided above and I see the response being logged and the request resolves successfully, both in dev and prod builds.

Have you tried with a minimal example like the starter app to see if the same occurs? Any additional routes in your router that may also be executing and preventing a response?

This happens on one of the projects I’m working on with certain origin. Also, this is reproducible on cloud only, everything is fine locally.

I’ll try reducing routes amount just to test it with minimal router.

I did just test with the same starter example using the origin to example.com and it worked fine in the cloud. The console.log was also reported to the server logs so I know the transform was being executed.

Let me know if alternating your router changes the behavior.

I just cleaned my routes leaving only a couple:

  • the issue is still there
  • if I switch my origin to something like example.com it works fine.

Solution: XDN IPs need to be whitelisted from the origin site.
In this case origin site I worked with was under Akamai and it had some bot protection.