Hi,
I’m building a Coda Pack and I’m running into this error while syncing data from an external API:
FetchError: content size over limit: 4194304
Some API responses are several MB in size, and it seems Coda blocks the response before the Pack can process it.
I wanted to ask:
-
Is this response size limit fixed, or can it be increased?
-
What is the recommended approach for handling large API responses in Packs?
-
Should the data be split using pagination, filters, batching, or another strategy?
My use case is syncing clients from an external API endpoint, but certain responses exceed the limit.
Thanks.
I think there are 2 options to deal with this…
The easiest is to change your logic so the API is called multiple times with a more limited search criteria so it returns a smaller subset of the data each time. So instead of a single call to your pack for ALL the data, you arrange your document’s logic so it only asks for the subset needed for a specific part of the task.
The second, more advanced option, is to use a sync table to hold the data from the external API.
The Coda Pack SDK documentation explains how to tie a sync table to an external API such that it uses the industry standard “continuation” mechanism to iterate through the large set of results and store them in the sync table without timing out.
This is a fairly advanced form of pack building so you may need to engage an experienced Coda Pack building expert to engineer the solution.
The documentation for this is here…
respect
Max
As @Max_OBrien said, the preferred approach is to adjust your API request to return a more targeted set of data or paginate through the data, to keep it under the limit. For some APIs that is impossible, and if that is the case you can apply for a higher limit using the support form linked to at the bottom of the support page in the documentation: