From e07d1d1ddb0776f160591bc3ce006b57e984aa74 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Sun, 29 Oct 2023 11:27:03 +1300 Subject: [PATCH] Add originalUrl to error object --- server/app.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/app.js b/server/app.js index 03ffd081a..4d5f7d8a4 100644 --- a/server/app.js +++ b/server/app.js @@ -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',