FlowiseAI/Flowise · error · Error

Failed to fetch ${url} from Airtable: ${error}

Error message

Failed to fetch ${url} from Airtable: ${error}

What it means

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.

Source

Thrown at packages/components/nodes/documentloaders/Airtable/Airtable.ts:324

            return this.loadAll()
        }
        return this.loadLimit()
    }

    protected async fetchAirtableData(url: string, data: AirtableLoaderRequest): Promise<AirtableLoaderResponse> {
        try {
            const headers = {
                Authorization: `Bearer ${this.accessToken}`,
                'Content-Type': 'application/json',
                Accept: 'application/json'
            }
            const response = await axios.post(url, data, { headers })
            return response.data
        } catch (error) {
            if (axios.isAxiosError(error)) {
                throw new Error(`Failed to fetch ${url} from Airtable: ${error.message}, status: ${error.response?.status}`)
            } else {
                throw new Error(`Failed to fetch ${url} from Airtable: ${error}`)
            }
        }
    }

    private createDocumentFromPage(page: AirtableLoaderPage): IDocument {
        // Generate the URL
        const pageUrl = `https://api.airtable.com/v0/${this.baseId}/${this.tableId}/${page.id}`

        // Return a langchain document
        return new Document({
            pageContent: JSON.stringify(page.fields, null, 2),
            metadata: {
                url: pageUrl
            }
        })
    }

    private async loadLimit(): Promise<IDocument[]> {

View on GitHub (pinned to abe4a8601a)

Solutions

  1. Inspect the stringified value - if it contains 'TypeError' or 'Cannot read properties of undefined', the accessToken or url is missing.
  2. Verify getCredentialParam('accessToken', ...) returns a non-empty string before constructing the loader.
  3. If you control the call site, ensure the catch preserves Error types: throw error rather than new Error(String(error)).
Defensive patterns

Strategy: try-catch

Validate before calling

function validateAirtableRequestParams(p: { accessToken?: unknown; url?: unknown; data?: unknown }) {
  if (typeof p.accessToken !== 'string' || p.accessToken === '') throw new Error('accessToken missing')
  if (typeof p.url !== 'string' || !/^https:\/\/api\.airtable\.com\//.test(p.url)) throw new Error(`Unexpected Airtable url: ${p.url}`)
  if (typeof p.data !== 'object' || p.data === null) throw new Error('Airtable request body must be an object')
}

Type guard

function isNonAxiosThrowable(e: unknown): boolean {
  return !(typeof e === 'object' && e !== null && typeof (e as any).isAxiosError === 'boolean' && (e as any).isAxiosError === true)
}

Try / catch

try {
  await loader.load()
} catch (error) {
  const msg = error instanceof Error ? error.message : String(error)
  if (/TypeError|Cannot read prop/.test(msg)) {
    // accessToken/url likely undefined - check credential mapping
  }
  throw error
}

Prevention

When it happens

Trigger: 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.

Common situations: Credential mapping broken so accessToken is undefined; runtime without axios properly initialized; a custom interceptor rejecting with a plain object.

Related errors


AI-assisted analysis of FlowiseAI/Flowise@abe4a8601a (2026-08-12). Data as JSON: /api/errors/d6c3a21392a1a1b6. Report an issue: GitHub.