1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-24 09:08:07 +02:00

Write string-data into the .error-file created for broken test-manifest links (issue 19579)

This appears to have broken in PR 17431, since prior to that the `downloadFile` function returned a string (via a callback) on failure and now we're instead rejecting with an Error.
This commit is contained in:
Jonas Jenwald 2025-02-28 17:05:15 +01:00
parent 6e1cfa20d1
commit d1b2476c14

View file

@ -88,7 +88,7 @@ async function downloadManifestFiles(manifest) {
} catch (ex) {
console.error(`Error during downloading of ${url}:`, ex);
fs.writeFileSync(file, ""); // making it empty file
fs.writeFileSync(`${file}.error`, ex);
fs.writeFileSync(`${file}.error`, ex.toString());
}
}
}