Help

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

345 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Mduduzi_Ndhlovu
4 - Data Explorer
4 - Data Explorer

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 })
}
}

`

1 Reply 1
Martin_Edwards
5 - Automation Enthusiast
5 - Automation Enthusiast

I'm getting this also.