code-connect icon indicating copy to clipboard operation
code-connect copied to clipboard

the code-connect fetch timeout is too short

Open gitawego opened this issue 3 months ago • 0 comments

Please provide:

  • Code Connect CLI version [use npx figma -V if using React, or figma -V otherwise, to get the version of your CLI] v1.3.6
  • Operating system: WLS under windows

The fetch timeout is too short, it get timeout even I set batch size to 1

in the node_modules/@figma/code-connect/dist/common/fetch.js file I have to manually add

const customAgent = new undici_1.Agent({
  connect: {
    // Set the connection timeout to 30,000 ms (30 seconds)
    timeout: 30_000,
  }
});

then in the code where the fetch call is executed

const response = await fetch(url, { ...options, method, dispatcher:customAgent });

Please allow us to set the timeout value

gitawego avatar Oct 26 '25 20:10 gitawego