{"record":{"id":"ab890490f0fe5a84","repo":"siyuan-note/siyuan","slug":"response-statustext","errorCode":null,"errorMessage":"response.statusText","messagePattern":"response\\.statusText","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"app/src/menus/util.ts","lineNumber":288,"sourceCode":"        if (blob.type === \"image/png\") {\n            copyBlob(blob);\n            return;\n        }\n        const objectURL = URL.createObjectURL(blob);\n        const tempElement = document.createElement(\"img\");\n        tempElement.onload = () => {\n            imageToPNGClipboard(tempElement);\n            URL.revokeObjectURL(objectURL);\n        };\n        tempElement.onerror = () => {\n            URL.revokeObjectURL(objectURL);\n            showCopyError();\n        };\n        tempElement.src = objectURL;\n    };\n    fetch(link).then(async (response) => {\n        if (!response.ok) {\n            throw new Error(response.statusText);\n        }\n        blobToPNGClipboard(await response.blob());\n    }).catch(() => {\n        // fetch 失败时回退：以 CORS 模式加载后再导出（需目标服务器返回 ACAO）\n        const tempElement = document.createElement(\"img\");\n        tempElement.crossOrigin = \"anonymous\";\n        tempElement.onload = () => imageToPNGClipboard(tempElement);\n        tempElement.onerror = showCopyError;\n        tempElement.src = link;\n    });\n};\n","sourceCodeStart":270,"sourceCodeEnd":300,"githubUrl":"https://github.com/siyuan-note/siyuan/blob/8641553a1f07374001902d3ce773285db1292b2d/app/src/menus/util.ts#L270-L300","documentation":"In copyPNGByLink, the fetch of the image link completed but response.ok was false (non-2xx HTTP status), and the rejection carries the HTTP statusText. The remote or proxied image could not be downloaded for PNG clipboard conversion.","triggerScenarios":"Thrown at app/src/menus/util.ts:288 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Confirm the image URL is reachable and returns 2xx","Check kernel network proxy settings if the link is remote","Copy the image manually from the browser when the server blocks programmatic fetch"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8641553a1f07374001902d3ce773285db1292b2d","analyzedAt":"2026-09-11T16:08:28.414Z","contentChangedAt":"2026-09-11T16:08:28.414Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}