import/export: On export error return 500 instead of crashing

This commit is contained in:
Richard Hansen 2021-03-17 18:54:57 -04:00 committed by John McLear
parent 3a11e97758
commit 83f39289aa
3 changed files with 31 additions and 6 deletions

View file

@ -60,7 +60,7 @@ exports.expressCreateServer = (hookName, args, cb) => {
}
console.log(`Exporting pad "${req.params.pad}" in ${req.params.type} format`);
exportHandler.doExport(req, res, padId, readOnlyId, req.params.type);
await exportHandler.doExport(req, res, padId, readOnlyId, req.params.type);
}
})().catch((err) => next(err || new Error(err)));
});