GV14982 / async-airtable

A lightweight npm package to handle working with the Airtable API.
https://www.npmjs.com/package/asyncairtable
MIT License
53 stars 5 forks source link

Permissions Error #55

Closed anthonygualandri closed 3 years ago

anthonygualandri commented 3 years ago

When calling the createRecord method with the typecast param set to true in an attempt to use the record name instead of record ID to add an entry to a linked record field in the new record I get the following error from Airtable. Is this correct behavior? From Airtable's api docs it appears that typecast alllows for them to do data conversion from string values. Thanks!

Error: Error: {"error":{"type":"INVALID_PERMISSIONS","message":"You are not permitted to perform this operation because the field or table has been configured to limit who can perform this operation"}} at AsyncAirtable. (/rbd/pnpm-volume/167adb67-e569-4731-8084-63cd4f28a871/node_modules/.registry.npmjs.org/asyncairtable/2.1.0/node_modules/asyncairtable/lib/asyncAirtable.js:284:31) at step (/rbd/pnpm-volume/167adb67-e569-4731-8084-63cd4f28a871/node_modules/.registry.npmjs.org/asyncairtable/2.1.0/node_modules/asyncairtable/lib/asyncAirtable.js:44:23) at Object.next (/rbd/pnpm-volume/167adb67-e569-4731-8084-63cd4f28a871/node_modules/.registry.npmjs.org/asyncairtable/2.1.0/node_modules/asyncairtable/lib/asyncAirtable.js:25:53) at fulfilled (/rbd/pnpm-volume/167adb67-e569-4731-8084-63cd4f28a871/node_modules/.registry.npmjs.org/asyncairtable/2.1.0/node_modules/asyncairtable/lib/asyncAirtable.js:16:58) at processTicksAndRejections (internal/process/task_queues.js:86:5)

anthonygualandri commented 3 years ago

Figured out that I'm getting this error when trying to add to a linked record field that's linking to a table that is synced with another base (synced tables is a newish feature Airtable released). Going to ping their support team about it. Will report back here when I hear back.

anthonygualandri commented 3 years ago

The error was being thrown because the name of the record I was trying to link didn't match any in that table and Airtable tries to create a new record when this happens. However, it errored in this case becasuse it was a synced table, and so new records can't be created in them. I've suggested to Airtable to updte their error message so that this is more clear, as it isn't clear from their docs that they even try to create a new record when this happens.

GV14982 commented 3 years ago

Hey there, thanks for the heads up! I appreciate the info here, as I wasn't even aware Airtable was capable of this.