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

  1. Read the embedded HTTP code: 404 → refresh the skills panel (list is stale); 401 → sign in again; 5xx → retry when backend is healthy.
  2. Refresh the SkillsPanel list before retrying so stale names are dropped.
  3. 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

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


AI-assisted analysis of Significant-Gravitas/AutoGPT@9c8bb5550f (2026-08-14). Data as JSON: /api/errors/dcfb3a485a21a623. Report an issue: GitHub.