{"record":{"id":"a978457dfc356c62","repo":"mui/material-ui","slug":"status-response-status","errorCode":null,"errorMessage":"status ${response.status}","messagePattern":"status (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/mui-icons-material/scripts/download.mjs","lineNumber":163,"sourceCode":" * @param {string[]} icon.tags - The tags associated with the icon.\n * @param {number[]} icon.sizes_px - The available sizes of the icon in pixels.\n * @returns {Promise<void[]>} A promise that resolves when all icons are downloaded and saved.\n */\nfunction downloadIcon(icon) {\n  console.log(`downloadIcon ${icon.index}: ${icon.name}`);\n\n  return Promise.all(\n    Object.keys(themeMap).map(async (theme) => {\n      const formattedTheme = themeMap[theme].split('_').join('');\n      const family = familyMap[theme];\n      if (icon.unsupported_families.includes(family)) {\n        return;\n      }\n      const response = await fetch(\n        `https://fonts.gstatic.com/s/i/materialicons${formattedTheme}/${icon.name}/v${icon.version}/24px.svg`,\n      );\n      if (response.status !== 200) {\n        throw new Error(`status ${response.status}`);\n      }\n      const SVG = await response.text();\n      await fs.writeFile(\n        path.join(\n          currentDirectory,\n          `../material-icons/${icon.name}${themeFileMap[theme]}_24px.svg`,\n        ),\n        overrides.get(`${icon.name}${themeFileMap[theme]}`) || SVG,\n      );\n    }),\n  );\n}\n\nasync function run() {\n  try {\n    const argv = yargs(process.argv.slice(2))\n      .usage('Download the SVG from material.io/resources/icons')\n      .describe('start-after', 'Resume at the following index').argv;","sourceCodeStart":145,"sourceCodeEnd":181,"githubUrl":"https://github.com/mui/material-ui/blob/bdc96df2cb530fcdd60a7a7aabe37f610ce0f0a5/packages/mui-icons-material/scripts/download.mjs#L145-L181","documentation":"download.mjs fetches each Material Icon variant from fonts.gstatic.com (e.g. https://fonts.gstatic.com/s/i/materialicons/<name>/v<version>/24px.svg). If the response status is not 200, it throws `status <code>` with no body context. This is a network/upstream guard so a partial icon set does not silently get written as an error-page SVG.","triggerScenarios":"Running the icon download script when an icon version is wrong (404), gstatic rate-limits or has an outage (429/5xx), or network/proxy returns a non-200 (captive portal, corporate proxy block).","commonSituations":"Material Icons metadata lists a version that does not exist on gstatic; transient gstatic errors; CI behind a restrictive proxy; outdated icon metadata cache.","solutions":["Retry the download script — most 5xx/429 responses are transient.","If a specific icon 404s, refresh the icon metadata (codepoints/version manifest) so the version number is current.","If behind a proxy, set HTTPS_PROXY and ensure the proxy permits fonts.gstatic.com.","Skip unsupported families (the code already does) and confirm the icon name is spelled exactly as in the manifest."],"exampleFix":"// before\nconst response = await fetch(url);\nif (response.status !== 200) throw new Error(`status ${response.status}`);\n// after — surface the failing URL/icon for diagnosis\nif (response.status !== 200) throw new Error(`status ${response.status} for ${icon.name} (${url})`);","handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"async function fetchWithRetry(url, { retries = 3, backoff = 1000 } = {}) {\n  for (let attempt = 0; ; attempt++) {\n    const res = await fetch(url);\n    if (res.status === 200) return res;\n    if (res.status >= 500 && attempt < retries) { await new Promise(r => setTimeout(r, backoff * (attempt + 1))); continue; }\n    throw new Error(`status ${res.status} for ${url}`);\n  }\n}","preventionTips":["Refresh the icon metadata manifest before bulk downloads so version numbers are current.","Run downloads with a retry/backoff wrapper around fetch.","Run icon downloads from a network that allows fonts.gstatic.com (no restrictive proxy)."],"tags":["network","icons","tooling","ci"],"backgroundTag":null,"analyzedSha":"bdc96df2cb530fcdd60a7a7aabe37f610ce0f0a5","analyzedAt":"2026-08-12T22:59:56.717Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}