mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-20 23:46:14 -04:00
import/export: Use Error objects for errors, not strings
This commit is contained in:
parent
59c167e31b
commit
216aecd433
3 changed files with 6 additions and 7 deletions
|
@ -102,7 +102,7 @@ exports.doExport = async (req, res, padId, readOnlyId, type) => {
|
|||
// @TODO no Promise interface for convertors (yet)
|
||||
await new Promise((resolve, reject) => {
|
||||
convertor.convertFile(srcFile, destFile, type, (err) => {
|
||||
err ? reject('convertFailed') : resolve();
|
||||
err ? reject(new Error('convertFailed')) : resolve();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue