Help

The Community will be undergoing maintenance from Friday February 21 - Friday, February 28 and will be "read only" during this time. To learn more, check out our Announcements blog post.

Re: remoteFetchAsync() returns "Request Timeout"

4334 2
cancel
Showing results for 
Search instead for 
Did you mean: 
Zollie
10 - Mercury
10 - Mercury

Iā€™m using the scripting app to send data via API request to another application. Itā€™s currently functioning, and the other application is able to take the data and perform as required.

However, Iā€™m having trouble getting a response from the API request that doesnā€™t timeout. It works for one or two records, but beyond that itā€™ll return a Request Timeout error. Surprisingly, the code does wait for the function to be fully performed (I get a loading icon), but the response information doesnā€™t seem to be waiting.

Is this a limitation with remoteFetchAsync/Airtable or is something wrong with my implementation?

Related code:
(Iā€™ve replaced the URL and header/x-functions-key with dummy strings):

const stringifiedData = JSON.stringify(data);
const url = "private_url";
const requestOptions = {
    method: "POST",
    headers: {
        "Content-Type": "application/json",
        "x-functions-key": "private_key",
    },
    body: stringifiedData,
    keepalive: true
};
await remoteFetchAsync(url, requestOptions).then(response => {
    console.log(response)
})
6 Replies 6
Nathaniel_Grano
8 - Airtable Astronomer
8 - Airtable Astronomer

Sorry if Iā€™m being a bit dense. What specifically happens when you run the code above (with the real URL/key, etc)? Is there a console error? Can you paste a screenshot?

Have you looked into the Networking tab of your browser tools? What does the browser show as the status of the request/response?

Not at all dense. Response from console.log below.

{type: "basic", url: "private_url", status: 408, statusText: "Request Timeout", ok: falseā€¦}
type: "basic"
url: "private_url"
status: 408
statusText: "Request Timeout"
ok: false
headers: Object
redirected: false

network_status_codes

I also noticed that the console.log statement occurs before the network messages halt. So my initial thought that the promise is waiting for activity to halt was likely false - it really is timing out.

Can anyone speak to Airtableā€™s timeout limitations?

Ah, I forgot you were using remoteFetch which proxies the request via airtableā€™s servers. Are you using a remoteFetch instead of a regular fetch intentionally (for example, due to cors restrictions)? Iā€™ve generally used standard fetch so I canā€™t speak to timeout limits of the remote execution.

Yes. When I attempt fetch, I receive a TypeError: NetworkError which offers a CORS related explanation

Nathaniel_Grano
8 - Airtable Astronomer
8 - Airtable Astronomer

Alright, afraid I donā€™t have any real experience with the remoteFetchAsync function so I canā€™t help further.
If you havenā€™t already, you might drop a line to support@airtable.com.

lilliandaya
4 - Data Explorer
4 - Data Explorer

Hi, I'm running into the same exact issue, I've spent a few hours now trying to work around it, and then finally came across your post, were you able to resolve this?