n8n-io/n8n · error · NodeOperationError
${operation.error.message ?? 'Unknown error'}
Error message
${operation.error.message ?? 'Unknown error'} What it means
Failure in uploadToFileSearchStore: after the uploadToFileSearchStore LRO completes polling (operation.done === true), if the operation carries an 'error' object the node throws operation.error.message ?? 'Unknown error' with description 'Error uploading file to File Search store'. This is a server-side failure during indexing into a File Search store.
Source
Thrown at packages/@n8n/nodes-langchain/nodes/vendors/GoogleGemini/helpers/utils.ts:307
const operationName = uploadResponse.body.name;
let operation = (await apiRequest.call(
this,
'GET',
`/v1beta/${operationName}`,
)) as FileSearchOperation;
while (!operation.done) {
await new Promise((resolve) => setTimeout(resolve, OPERATION_CHECK_INTERVAL));
operation = (await apiRequest.call(
this,
'GET',
`/v1beta/${operationName}`,
)) as FileSearchOperation;
}
if (operation.error) {
throw new NodeOperationError(this.getNode(), operation.error.message ?? 'Unknown error', {
description: 'Error uploading file to File Search store',
});
}
return operation.response;
}
export async function listFileSearchStores(
this: IExecuteFunctions,
pageSize?: number,
pageToken?: string,
) {
const qs: IDataObject = {};
if (pageSize !== undefined) {
qs.pageSize = pageSize;
}
if (pageToken) {
qs.pageToken = pageToken;View on GitHub (pinned to 5ac6606e81)
Solutions
- Read operation.error.message for the exact server reason.
- Confirm the fileSearchStoreName still exists (listFileSearchStores) and the displayName is unique.
- Use a text-based or text-layer PDF / supported doc; retry on transient errors.
- Reduce the file size / split large documents before upload.
Defensive patterns
Strategy: retry
Validate before calling
function isIndexableDoc(buf: Buffer, mime: string): boolean {
return mime === 'application/pdf' || mime.startsWith('text/') || mime === 'text/plain';
} Type guard
interface FileSearchLro { done: boolean; error?: { message: string }; response?: unknown }
function isFileSearchFailure(op: FileSearchLro): boolean {
return op.done === true && !!op.error;
} Try / catch
for (let attempt = 1; attempt <= 3; attempt++) {
try { return await uploadToFileSearchStore(i, store, name, url, mime); }
catch (e) {
if (attempt === 3 || /quota|unsupported|not exist/i.test(e.message)) throw e;
await new Promise(r => setTimeout(r, 1000 * attempt));
}
} Prevention
- Confirm the File Search store exists (listFileSearchStores) before uploading.
- Use text-layer PDFs / plain text for reliable indexing.
- Keep within per-store file count/size; retry once for transient indexing errors.
When it happens
Trigger: The file bytes uploaded fine but indexing into the File Search store failed: unsupported document type for retrieval, file too large for the store, duplicate displayName, store quota exceeded, or the store was concurrently deleted.
Common situations: Pointing a File Search operation at a store that doesn't exist anymore; uploading a scanned image PDF that can't be parsed; exceeding per-store file count/size; transient backend indexing error.
Related errors
- ${response.error.message}
- ${uploadResponse.file.error?.message ?? 'Unknown error'}
- Failed to get upload URL
- ${file.error?.message ?? 'Unknown error'}
- Model ${model} is not supported for image generation
AI-assisted analysis of n8n-io/n8n@5ac6606e81 (2026-08-12).
Data as JSON: /api/errors/682dcaee574ba130.
Report an issue: GitHub.