infiniflow/ragflow · error · Error
Failed to list skills folder
Error message
Failed to list skills folder
What it means
Thrown in web/src/pages/skills/hooks.ts:824 when the initial fileManagerService.listFile({ parent_id: spaceFolderId }) call — used to check whether the skill folder already exists — resolves with code !== 0. The existence check itself failed, so the code cannot decide between reuse and creation and aborts before creating anything.
Source
Thrown at web/src/pages/skills/hooks.ts:824
}
skillFolderId = existingSkill.id;
} else {
// Create skill folder
const folderRes = await fileManagerService.createFolder({
name: skillNameNormalized,
type: 'folder',
parent_id: spaceFolderId,
});
if (folderRes.data.code !== 0) {
throw new Error('Failed to create skill folder');
}
skillFolderId = folderRes.data.data?.id;
}
} else {
throw new Error('Failed to list skills folder');
}
if (!skillFolderId) throw new Error('Failed to get skill folder ID');
// Create version folder
const versionRes = await fileManagerService.createFolder({
name: version,
type: 'folder',
parent_id: skillFolderId,
});
if (versionRes.data.code !== 0) {
throw new Error('Failed to create version folder');
}
const versionFolderId = versionRes.data.data?.id;
if (!versionFolderId)View on GitHub (pinned to 554fb1133a)
Solutions
- Include listData code/message in the thrown error for diagnosis
- Re-resolve the space folder (ensureSkillSpaceFolder) and retry the list once before failing
- Verify spaceFolderId is a non-empty string before use
- Re-authenticate and retry the upload from scratch if the code indicates auth failure
Example fix
// before
} else {
throw new Error('Failed to list skills folder');
}
// after
} else {
throw new Error(
`[${existingData.code}] ${existingData.message || 'Failed to list skills folder'}`,
);
} Defensive patterns
Strategy: retry
Validate before calling
const isParentValid = async (parentId: string) =>
(await fileManagerService.listFile({ parent_id: parentId })).data.code === 0; Try / catch
try {
const { data } = await fileManagerService.listFile({ parent_id });
if (data.code !== 0) throw new Error(data.message);
} catch (e) {
await backoffRetry(); // transient backend error
} Prevention
- Re-resolve the space folder immediately before the listing instead of reusing a stale id
- Include code and message in the error to distinguish auth vs missing-parent failures
When it happens
Trigger: spaceFolderId points to a deleted or inaccessible folder; auth token expired between the space-folder step and the listing; backend file-manager error (DB hiccup); parent_id sent as undefined because ensureSkillSpaceFolder returned an id-shaped falsy value earlier.
Common situations: Space folder deleted by another session between upload steps. Long upload dialog left open past token expiry. Backend restart mid-flow.
Related errors
- Skills space not found
- Failed to create skill folder
- Failed to get skill folder ID
- Failed to create version folder
- Failed to get version folder ID
AI-assisted analysis of infiniflow/ragflow@554fb1133a (2026-08-15).
Data as JSON: /api/errors/3727aec44ccc9fef.
Report an issue: GitHub.