The Community will be temporarily unavailable starting on Friday February 28. We’ll be back as soon as we can! To learn more, check out our Announcements blog post.
May 11, 2022 11:05 AM
Using node Airtable calls, when running a the fetch calls, randomly calls will return an error with
FetchError: request to https://api.airtable.com/v0/**************/Popular%20Searches%20Filter/recG77zPA5fNrb05z? failed, reason: getaddrinfo ENOTFOUND api.airtable.com
Doing basic call
base('Card Data').select({
view: "Selected View",
pageSize: 3,
}).eachPage(function page(records, fetchNextPage) {
// code here
fetchNextPage();
}, function done(err) {
if (err) { console.error(err); return; }
});
May 13, 2022 08:10 AM
Adding a little more context. I believe it is randomly returning the error on the table.find
call
base('MOS Card Data').select({
// Selecting the first 3 records in CMT: Client View:
view: "Tech: All English MOS",
pageSize: 3,
// maxRecords: 1,
}).eachPage(function page(records, fetchNextPage) {
console.log(records.length)
records.forEach(function(record) {
const table = base("Popular Searches Filter");
const filters = record.get('Popular Searches Filter');
const mosCode = record.get("mosCode");
console.log('attempting to write out MOS code: ' + mosCode);
console.log(filters)
if (filters !== undefined && filters !== '') {
filters.forEach((item, index) => {
table.find(item, (err, rec) => {
try {
if (err) {
console.log(`***************** BAD MOS CODE: ${mosCode} **********************`)
console.error(err)
return
}
const term = rec.get("Search Term");
const output = `${filterMap[term]}\n`;
console.log(`${mosCode}`)
fs.writeFile(`./mos-filters/${mosCode}.json`, output, { flag: "a+" }, (err) => {
if (err) throw err;
});
} catch (err) {
console.log(err)
}
});
});
}
});
fetchNextPage();
}, function done(err) {
if (err) { console.log('**************** bad fetch ******************'); console.error(err); return; }
});
May 17, 2022 01:22 PM
bumping, looking for a possible solution as this is core functionality to the API
May 31, 2022 07:43 AM
I get the same error message.
Jul 18, 2023 12:25 AM
I am sorry, stuck with the same issue on my node app, could you please advise if you've got a chance to resolve this?