feat: add link to redirect user to Quora in case of errors

if user stumbles upon some error page, or a route that is yet to be implemented, added a link so that user can easily go to Quora should he/she wishes to do so.
This commit is contained in:
zyachel 2022-06-15 22:11:50 +05:30
parent ad014480ea
commit 2dd4a030d2
3 changed files with 5 additions and 0 deletions

View file

@ -36,6 +36,7 @@ const sendErrorResponse = (err, req, res, devMode = false) => {
title: 'Error',
url: `${req.urlObj.origin}${req.urlObj.pathname}`,
imageUrl: `${req.urlObj.origin}/icon.svg`,
urlObj: req.urlObj,
description: `ERROR: ${err.message}. Please try again later.`,
},
});

View file

@ -78,6 +78,7 @@ export const unimplemented = (req, res, next) => {
title: 'Not yet implemented',
url: `${req.urlObj.origin}${req.urlObj.pathname}`,
imageUrl: `${req.urlObj.origin}/icon.svg`,
urlObj: req.urlObj,
description: message,
},
});

View file

@ -12,4 +12,7 @@ block content
p.error__return Go back to the 
a.error__link(href="/") Home Page
|.
p.error__return Or view this route 
a.error__link(href="https://www.quora.com" + meta.urlObj.pathname) on Quora
|.