mirror of
https://gitlab.com/wgp/dougal/software.git
synced 2025-12-06 09:47:08 +00:00
Send specific error message if HTML template not found
This commit is contained in:
@@ -16,7 +16,11 @@ const html = async function (req, res, next) {
|
|||||||
res.status(200).send(response);
|
res.status(200).send(response);
|
||||||
next();
|
next();
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
next(err);
|
if (err.message.startsWith("template")) {
|
||||||
|
next({message: err.message});
|
||||||
|
} else {
|
||||||
|
next(err);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user