{"record":{"id":"b1591c32d3fbebe1","repo":"ramensoftware/windhawk","slug":"the-response-carries-no-changelog","errorCode":null,"errorMessage":"The response carries no changelog","messagePattern":"The response carries no changelog","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/windhawk-frontend/apps/windhawk-frontend/src/app/panel/about/ChangelogModal.tsx","lineNumber":54,"sourceCode":"  useEffect(() => {\n    // Fetch when modal opens if we haven't successfully fetched yet\n    // On error, allow retry when modal is reopened (not immediate retry)\n    if (props.open && fetchStatusRef.current !== 'success' && fetchStatusRef.current !== 'loading') {\n      fetchStatusRef.current = 'loading';\n      setLoading(true);\n      setHasError(false);\n\n      fetchText(CHANGELOG_URL)\n        .then((textWithNull) => {\n          // The response is the latest version and the changelog, separated by a\n          // NUL. Any other 2xx body - a CDN interstitial, a format change - has\n          // no changelog in it, and is reported as a failure the user can retry\n          // instead of an empty dialog that no reopen refreshes.\n          const separatorIndex = textWithNull.indexOf('\\0');\n          const text =\n            separatorIndex === -1 ? '' : textWithNull.slice(separatorIndex + 1);\n          if (!text.trim()) {\n            throw new Error('The response carries no changelog');\n          }\n\n          setChangelog(text);\n          fetchStatusRef.current = 'success';\n          setLoading(false);\n        })\n        .catch((err) => {\n          console.error('Failed to fetch changelog:', err);\n          setHasError(true);\n          fetchStatusRef.current = 'error';\n          setLoading(false);\n        });\n    }\n  }, [props.open]);\n\n  return (\n    <Modal\n      open={props.open}","sourceCodeStart":36,"sourceCodeEnd":72,"githubUrl":"https://github.com/ramensoftware/windhawk/blob/61d99ed8e182e1af1b60109612b6763ad1b4b74e/src/windhawk-frontend/apps/windhawk-frontend/src/app/panel/about/ChangelogModal.tsx#L36-L72","documentation":"ChangelogModal fetches a mod's changelog from the backend; the payload arrives as text with a metadata section, a NUL separator ('\\0'), and the changelog text after it. If the separator is missing the text is treated as empty, and if the extracted changelog is blank the component throws this error so the UI shows a retryable failure instead of an empty dialog that reopening would never refresh.","triggerScenarios":"Opening the changelog modal for a mod whose backend response has no NUL separator or an empty/whitespace-only changelog section — e.g. a mod with no published changelog entries, an API/CDN response that returned an error page or truncated body, or a backend format change.","commonSituations":"Viewing the changelog of a brand-new or newly updated mod whose changelog hasn't propagated on the server; offline/proxied networks returning HTML error bodies; older mods that never had changelog data.","solutions":["Click retry / reopen the modal — transient network or CDN issues often resolve; the component sets fetchStatus to failure precisely so a reopen re-fetches.","Verify the mod actually has a changelog on windhawk.net; if it has none, the error is expected — treat it as 'no changelog available'.","Check the network response in DevTools: if it's an error page or non-mod payload, the backend request failed — retry later or report an API issue.","If persistent for a specific mod, report the mod's missing changelog data to the mod author or Windhawk maintainers."],"exampleFix":"// caller-side guard\ntry {\n  await openChangelog(modId);\n} catch (e) {\n  if (e.message === 'The response carries no changelog') {\n    showInfo('This mod has no changelog available.');\n  }\n}","handlingStrategy":"retry","validationCode":"const sep = text.indexOf('\\0');\nconst changelog = sep === -1 ? '' : text.slice(sep + 1);\nif (!changelog.trim()) console.warn('Response carries no changelog');","typeGuard":null,"tryCatchPattern":"try {\n  await openChangelogModal(modId);\n} catch (e) {\n  if (e.message === 'The response carries no changelog') {\n    showRetryableError('Changelog unavailable; the mod may have none. Retry?');\n  }\n}","preventionTips":["Retry once on failure before showing an error — the component already supports reopen/re-fetch.","Check the mod's website for an actual changelog before assuming a bug.","Inspect the raw HTTP response for error pages/CDN failures that produce metadata-less payloads."],"tags":["react","network","changelog","empty-response"],"backgroundTag":"empty-response-body","analyzedSha":"61d99ed8e182e1af1b60109612b6763ad1b4b74e","analyzedAt":"2026-09-12T14:02:41.115Z","contentChangedAt":"2026-09-12T14:02:41.115Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}