Significant-Gravitas/AutoGPT · error · Error
Failed to download skill (HTTP ${res.status})
Error message
Failed to download skill (HTTP ${res.status}) What it means
Thrown in SkillListItem's download handler when readCopilotSkill(skill.name) resolves with a status other than 200. The generated client resolves rather than throws on non-2xx, so this explicit check is the only failure surface. The HTTP code is embedded in the message and the error is shown in a destructive toast.
Source
Thrown at autogpt_platform/frontend/src/components/contextual/SkillsPanel/components/SkillListItem/useSkillListItem.ts:80
function closeDelete(open: boolean) {
setIsDeleteOpen(open);
}
function openView() {
setIsViewOpen(true);
}
function closeView(open: boolean) {
setIsViewOpen(open);
}
async function handleDownload() {
setIsDownloading(true);
try {
const res = await readCopilotSkill(skill.name);
if (res.status !== 200) {
throw new Error(`Failed to download skill (HTTP ${res.status})`);
}
const skillDetail = res.data as CopilotSkillDetail;
downloadTextFile(`${skill.name}.md`, renderSkillMarkdown(skillDetail));
} catch (error) {
toast({
title: "Failed to download skill",
description:
error instanceof Error
? error.message
: "An unexpected error occurred.",
variant: "destructive",
});
} finally {
setIsDownloading(false);
}
}
async function handleDelete() {View on GitHub (pinned to 9c8bb5550f)
Solutions
- Read the embedded HTTP code: 404 → refresh the skills panel (list is stale); 401 → sign in again; 5xx → retry when backend is healthy.
- Refresh the SkillsPanel list before retrying so stale names are dropped.
- If it persists for a skill that shows in the list, the backend skill registry and the listing API disagree — report the skill name.
Defensive patterns
Strategy: try-catch
Type guard
function isSkillDownloadFailure(err: unknown): boolean {
return err instanceof Error && err.message.startsWith("Failed to download skill");
} Try / catch
try {
const res = await readCopilotSkill(skill.name);
if (res.status !== 200) throw new Error(`Failed to download skill (HTTP ${res.status})`);
} catch (error) {
toast({ title: "Failed to download skill", description: (error as Error).message, variant: "destructive" });
} Prevention
- Always check .status on generated-client responses — they resolve instead of throwing on non-2xx.
- Refetch the skills list when a 404 appears instead of letting the user retry a stale name.
- Disable the download button while a download is in flight (setIsDownloading already guards double-clicks).
When it happens
Trigger: GET copilot skill detail by name returning 404 (skill renamed/removed from the catalog between panel load and click), 401/403 (session expired while the panel was open), or 5xx (backend down).
Common situations: Skills list loaded, backend upgraded/skill removed, then user clicks download; long-lived tab with expired auth; backend skill directory out of sync with the frontend catalog.
Related errors
- Failed to fetch session (status: ${response.status})
- Authentication failed — please sign in again.
- Failed to update schedule
- n8n template not found (${res.status})
- Failed to update email
AI-assisted analysis of Significant-Gravitas/AutoGPT@9c8bb5550f (2026-08-14).
Data as JSON: /api/errors/dcfb3a485a21a623.
Report an issue: GitHub.