{"record":{"id":"e905ff4a61436c13","repo":"bytedance/deer-flow","slug":"http-response-status-response-statustext-e905ff","errorCode":null,"errorMessage":"HTTP ${response.status}: ${response.statusText}","messagePattern":"HTTP (.+?): (.+?)","errorType":"exception","errorClass":"SkillRequestError","httpStatus":null,"severity":"error","filePath":"frontend/src/core/skills/api.ts","lineNumber":30,"sourceCode":"    this.status = status;\n  }\n\n  get isAdminRequired(): boolean {\n    return this.status === 403;\n  }\n}\n\nasync function readErrorDetail(response: Response): Promise<string> {\n  const data = (await response.json().catch(() => ({}))) as {\n    detail?: string;\n  };\n  return data.detail ?? `HTTP ${response.status}: ${response.statusText}`;\n}\n\nexport async function loadSkills() {\n  const skills = await fetch(`${getBackendBaseURL()}/api/skills`);\n  if (!skills.ok) {\n    throw new SkillRequestError(skills.status, await readErrorDetail(skills));\n  }\n  const json = await skills.json();\n  return json.skills as Skill[];\n}\n\nexport async function enableSkill(skillName: string, enabled: boolean) {\n  const response = await fetch(\n    `${getBackendBaseURL()}/api/skills/${skillName}`,\n    {\n      method: \"PUT\",\n      headers: {\n        \"Content-Type\": \"application/json\",\n      },\n      body: JSON.stringify({\n        enabled,\n      }),\n    },\n  );","sourceCodeStart":12,"sourceCodeEnd":48,"githubUrl":"https://github.com/bytedance/deer-flow/blob/1dd6ba1acb03700589994b0366c5d1c7d05e2eff/frontend/src/core/skills/api.ts#L12-L48","documentation":"Thrown when GET /api/skills fails. This lists the skills the backend discovered (public skills plus managed integration packs). SkillRequestError carries the status and the backend 'detail' or 'HTTP <status> <statusText>' fallback. Non-2xx typically means the skills directory is unreadable, extensions_config.json is broken, or the Gateway is not fully booted.","triggerScenarios":"Loading the skills page before skill scanning finished (503/500); skills/ directory or .deer-flow/integrations/skills missing or with bad permissions; a malformed SKILL.md frontmatter crashing the scanner (500); nginx 502 during Gateway restart.","commonSituations":"Cloning the repo without submodules/skills; running in Docker where the skills volume isn't mounted; a custom skill with invalid YAML frontmatter committed to skills/custom/.","solutions":["curl /api/skills and read the 'detail' body — scanner errors name the offending skill file","Validate each custom skill's SKILL.md frontmatter (YAML lint) and fix or remove the broken one","Ensure skills/ and .deer-flow/integrations/skills are present and readable by the Gateway process","Retry after Gateway startup completes (skill scan is logged at boot)"],"exampleFix":"// before\nconst skills = await loadSkills();\n\n// after\nconst skills = await loadSkills().catch((e) => {\n  if (e instanceof SkillRequestError && e.status >= 500) {\n    return [] as Skill[]; // degrade UI, surface retry\n  }\n  throw e;\n});","handlingStrategy":"fallback","validationCode":null,"typeGuard":"export function isSkillRequestError(e: unknown): e is SkillRequestError {\n  return e instanceof SkillRequestError;\n}","tryCatchPattern":"try {\n  return await loadSkills();\n} catch (e) {\n  if (isSkillRequestError(e) && e.status >= 500) {\n    return retryWithBackoff(() => loadSkills(), {tries: 2}); // Gateway booting\n  }\n  throw e;\n}","preventionTips":["Delay the skills fetch until Gateway /health is green","YAML-lint every SKILL.md frontmatter in CI","Mount skills/ read-only but present in container deployments"],"tags":["skills","http","frontend"],"backgroundTag":null,"analyzedSha":"1dd6ba1acb03700589994b0366c5d1c7d05e2eff","analyzedAt":"2026-08-14T21:20:34.804Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}