ExportHandler: Pass the error unmodified

This commit is contained in:
Richard Hansen 2021-03-17 18:40:42 -04:00 committed by John McLear
parent 216aecd433
commit 50fdadab7d

View file

@ -100,11 +100,7 @@ exports.doExport = async (req, res, padId, readOnlyId, type) => {
// console.log("export handled by plugin", destFile);
} else {
// @TODO no Promise interface for convertors (yet)
await new Promise((resolve, reject) => {
convertor.convertFile(srcFile, destFile, type, (err) => {
err ? reject(new Error('convertFailed')) : resolve();
});
});
await util.promisify(convertor.convertFile)(srcFile, destFile, type);
}
// send the file