Help

Upcoming database upgrades. Airtable functionality will be reduced for ~15 minutes at 06:00 UTC on Feb. 4 / 10:00 pm PT on Feb. 3. Learn more here

Airtable in serveless function throws "Expected signal to be an instanceof AbortSignal"

536 0
cancel
Showing results for 
Search instead for 
Did you mean: 

Hi all, Im trying to use airtable in netlify serverles functions. When I try to create a record, I keep getting this error “Expected signal to be an instanceof AbortSignal”.

`
const { formattedReturn } = require("./helpers")

const Airtable = require(“airtable”)

const base = new Airtable({ apiKey: “APIKey” }).base(“BaseID”)

const eventBookingTable = base(“Events”)

exports.handler = async function (event, context, callback) {

const newRecord = async () => {
const rec = await eventBookingTable
.create({
Name: “iamnotcrazy”,
Event: [“recwrjfffffff”],
Email: “mymomgotmetested@gmail.com”,
})
.catch(err => err)

return rec

}

try {
const record = await newRecord()

return formattedReturn(200, { record })

} catch (err) {
return formattedReturn(500, { err: err.message })
}
}

`

0 Replies 0