Fix worked, removing debug logging, and bumped node version.

This commit is contained in:
Darien Kindlund
2024-01-26 17:15:39 -05:00
committed by Darien Kindlund
parent 3b788e42e1
commit 2237b1ab16
@@ -20,7 +20,7 @@ class Airtable_DocumentLoaders implements INode {
constructor() { constructor() {
this.label = 'Airtable' this.label = 'Airtable'
this.name = 'airtable' this.name = 'airtable'
this.version = 2.0 this.version = 3.0
this.type = 'Document' this.type = 'Document'
this.icon = 'airtable.svg' this.icon = 'airtable.svg'
this.category = 'Document Loaders' this.category = 'Document Loaders'
@@ -225,15 +225,12 @@ class AirtableLoader extends BaseDocumentLoader {
'Content-Type': 'application/json', 'Content-Type': 'application/json',
Accept: 'application/json' Accept: 'application/json'
} }
console.log('Sending request to Airtable with data: ', data)
const response = await axios.post(url, data, { headers }) const response = await axios.post(url, data, { headers })
return response.data return response.data
} catch (error) { } catch (error) {
if (axios.isAxiosError(error)) { if (axios.isAxiosError(error)) {
console.error('Error response from Airtable:', error.response?.data)
throw new Error(`Failed to fetch ${url} from Airtable: ${error.message}, status: ${error.response?.status}`) throw new Error(`Failed to fetch ${url} from Airtable: ${error.message}, status: ${error.response?.status}`)
} else { } else {
console.error('An unexpected error occurred:', error)
throw new Error(`Failed to fetch ${url} from Airtable: ${error}`) throw new Error(`Failed to fetch ${url} from Airtable: ${error}`)
} }
} }