{"record":{"id":"d6c3a21392a1a1b6","repo":"FlowiseAI/Flowise","slug":"failed-to-fetch-url-from-airtable-error","errorCode":null,"errorMessage":"Failed to fetch ${url} from Airtable: ${error}","messagePattern":"Failed to fetch (.+?) from Airtable: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/components/nodes/documentloaders/Airtable/Airtable.ts","lineNumber":324,"sourceCode":"            return this.loadAll()\n        }\n        return this.loadLimit()\n    }\n\n    protected async fetchAirtableData(url: string, data: AirtableLoaderRequest): Promise<AirtableLoaderResponse> {\n        try {\n            const headers = {\n                Authorization: `Bearer ${this.accessToken}`,\n                'Content-Type': 'application/json',\n                Accept: 'application/json'\n            }\n            const response = await axios.post(url, data, { headers })\n            return response.data\n        } catch (error) {\n            if (axios.isAxiosError(error)) {\n                throw new Error(`Failed to fetch ${url} from Airtable: ${error.message}, status: ${error.response?.status}`)\n            } else {\n                throw new Error(`Failed to fetch ${url} from Airtable: ${error}`)\n            }\n        }\n    }\n\n    private createDocumentFromPage(page: AirtableLoaderPage): IDocument {\n        // Generate the URL\n        const pageUrl = `https://api.airtable.com/v0/${this.baseId}/${this.tableId}/${page.id}`\n\n        // Return a langchain document\n        return new Document({\n            pageContent: JSON.stringify(page.fields, null, 2),\n            metadata: {\n                url: pageUrl\n            }\n        })\n    }\n\n    private async loadLimit(): Promise<IDocument[]> {","sourceCodeStart":306,"sourceCodeEnd":342,"githubUrl":"https://github.com/FlowiseAI/Flowise/blob/abe4a8601a058047b350c260676826e21dd14101/packages/components/nodes/documentloaders/Airtable/Airtable.ts#L306-L342","documentation":"Non-Axios branch of fetchAirtableData: something threw but axios.isAxiosError returned false. Covers programming errors inside the try block (e.g., this.accessToken undefined causing a template-literal TypeError) or any non-HTTP exception. The error is stringified raw, so its type information is lost.","triggerScenarios":"accessToken is undefined/null and string interpolation in the Authorization header trips a guard; axios.post returns a non-Error rejected value; a polyfill or interceptor throws a string instead of an Error.","commonSituations":"Credential mapping broken so accessToken is undefined; runtime without axios properly initialized; a custom interceptor rejecting with a plain object.","solutions":["Inspect the stringified value - if it contains 'TypeError' or 'Cannot read properties of undefined', the accessToken or url is missing.","Verify getCredentialParam('accessToken', ...) returns a non-empty string before constructing the loader.","If you control the call site, ensure the catch preserves Error types: throw error rather than new Error(String(error))."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"function validateAirtableRequestParams(p: { accessToken?: unknown; url?: unknown; data?: unknown }) {\n  if (typeof p.accessToken !== 'string' || p.accessToken === '') throw new Error('accessToken missing')\n  if (typeof p.url !== 'string' || !/^https:\\/\\/api\\.airtable\\.com\\//.test(p.url)) throw new Error(`Unexpected Airtable url: ${p.url}`)\n  if (typeof p.data !== 'object' || p.data === null) throw new Error('Airtable request body must be an object')\n}","typeGuard":"function isNonAxiosThrowable(e: unknown): boolean {\n  return !(typeof e === 'object' && e !== null && typeof (e as any).isAxiosError === 'boolean' && (e as any).isAxiosError === true)\n}","tryCatchPattern":"try {\n  await loader.load()\n} catch (error) {\n  const msg = error instanceof Error ? error.message : String(error)\n  if (/TypeError|Cannot read prop/.test(msg)) {\n    // accessToken/url likely undefined - check credential mapping\n  }\n  throw error\n}","preventionTips":["Always type-check that accessToken is a non-empty string before building the Authorization header.","Ensure axios is properly initialized so errors thrown are real AxiosErrors, not strings."],"tags":["airtable","unexpected","error-handling"],"backgroundTag":null,"analyzedSha":"abe4a8601a058047b350c260676826e21dd14101","analyzedAt":"2026-08-12T16:04:40.823Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}