0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 18:32:41 +00:00

Add originalUrl to error object

This commit is contained in:
G.Ambatte
2023-10-29 11:27:03 +13:00
parent c5ebd0352d
commit e07d1d1ddb

View File

@@ -472,8 +472,9 @@ const getPureError = (error)=>{
};
app.use(async (err, req, res, next)=>{
const status = err.status || err.code || 500;
err.originalUrl = req.originalUrl;
console.error(err);
const status = err.status || err.code || 500;
req.ogMeta = { ...defaultMetaTags,
title : 'Error Page',