Skip to content

the code-connect fetch timeout is too short #336

@gitawego

Description

@gitawego

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions