{"record":{"id":"91ff90b9f2c57ce9","repo":"actualbudget/actual","slug":"failed-to-fetch-font-file-ref-cleanpath-from","errorCode":null,"errorMessage":"Failed to fetch font file \"${ref.cleanPath}\" from ${fontUrl}: ${response.status} ${response.statusText}","messagePattern":"Failed to fetch font file \"(.+?)\" from (.+?): (.+?) (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/desktop-client/src/style/customThemes.ts","lineNumber":607,"sourceCode":"\n    offset = closeBrace + 1;\n    searchCss = searchCss.substring(offset);\n  }\n\n  if (fontRefs.length === 0) return css;\n\n  // Fetch fonts sequentially to enforce a running total size budget\n  const fetched: { ref: FontRef; dataUri: string }[] = [];\n  let totalBytes = 0;\n  for (const ref of fontRefs) {\n    const fontUrl = baseUrl + ref.cleanPath;\n    const perFontTimeout = AbortSignal.timeout(FONT_FETCH_TIMEOUT_MS);\n    const fetchSignal = signal\n      ? AbortSignal.any([signal, perFontTimeout])\n      : perFontTimeout;\n    const response = await fetch(fontUrl, { signal: fetchSignal });\n    if (!response.ok) {\n      throw new Error(\n        `Failed to fetch font file \"${ref.cleanPath}\" from ${fontUrl}: ${response.status} ${response.statusText}`,\n      );\n    }\n    const buffer = await response.arrayBuffer();\n    if (buffer.byteLength > MAX_FONT_FILE_SIZE) {\n      throw new Error(\n        `Font file \"${ref.cleanPath}\" exceeds maximum size of ${MAX_FONT_FILE_SIZE / 1024 / 1024}MB.`,\n      );\n    }\n    totalBytes += buffer.byteLength;\n    if (totalBytes > MAX_TOTAL_FONT_SIZE) {\n      throw new Error(\n        `Total embedded font data exceeds maximum of ${MAX_TOTAL_FONT_SIZE / 1024 / 1024}MB.`,\n      );\n    }\n    const base64 = arrayBufferToBase64(buffer);\n    fetched.push({ ref, dataUri: `data:${ref.mime};base64,${base64}` });\n  }","sourceCodeStart":589,"sourceCodeEnd":625,"githubUrl":"https://github.com/actualbudget/actual/blob/d4334cb6e6123f4d3bcea1ad6166608884c7e658/packages/desktop-client/src/style/customThemes.ts#L589-L625","documentation":"Error \"Failed to fetch font file \"${ref.cleanPath}\" from ${fontUrl}: ${response.status} ${response.statusText}\" thrown in actualbudget/actual.","triggerScenarios":"Thrown at packages/desktop-client/src/style/customThemes.ts:607 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"d4334cb6e6123f4d3bcea1ad6166608884c7e658","analyzedAt":"2026-08-29T01:02:11.213Z","schemaVersion":2},"datasetVersion":"2026-08-29T02:17:18.158Z"}