Skip to content

Feature Request: Allow configuring getImages concurrency to avoid rate limit errors #191

@Jia-Yao

Description

@Jia-Yao

I have a script that calls the components function from @figma-export/core but started seeing errors with status code 429 Too Many Requests recently due to Figma's new rate limits - https://developers.figma.com/docs/rest-api/rate-limits/

From code tracing, it looks like we end up calling the getImages function in packages/core/lib/figma.ts with a hardcoded concurrency limit of 30:

const getImages = async (...) => {
    const idss = chunk(ids, 200);
    const limit = pLimit(30);  // <-- hardcoded
    // ...
};

Since Figma's rate limits vary by seat/plan, this hardcoded value definitely doesn't work for all users. Please consider making it configurable, thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions