mirror of
https://git.sr.ht/~cadence/bibliogram
synced 2026-03-01 18:31:35 +00:00
Add ENDPOINT_OVERRIDEN error symbol
Show proper 404 page for /u/privacy, /u/accounts, etc
This commit is contained in:
parent
f8f670c4a9
commit
3b1c6a2849
4 changed files with 6 additions and 4 deletions
|
|
@ -15,7 +15,7 @@ module.exports = [
|
|||
content: xml
|
||||
}
|
||||
}).catch(error => {
|
||||
if (error === constants.symbols.NOT_FOUND) {
|
||||
if (error === constants.symbols.NOT_FOUND || error === constants.symbols.ENDPOINT_OVERRIDDEN) {
|
||||
return render(404, "pug/friendlyerror.pug", {
|
||||
statusCode: 404,
|
||||
title: "Not found",
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ module.exports = [
|
|||
}
|
||||
return render(200, "pug/user.pug", {url, user, constants})
|
||||
}).catch(error => {
|
||||
if (error === constants.symbols.NOT_FOUND) {
|
||||
if (error === constants.symbols.NOT_FOUND || error === constants.symbols.ENDPOINT_OVERRIDDEN) {
|
||||
return render(404, "pug/friendlyerror.pug", {
|
||||
statusCode: 404,
|
||||
title: "Not found",
|
||||
|
|
@ -100,7 +100,7 @@ module.exports = [
|
|||
}
|
||||
}
|
||||
}).catch(error => {
|
||||
if (error === constants.symbols.NOT_FOUND) {
|
||||
if (error === constants.symbols.NOT_FOUND || error === constants.symbols.ENDPOINT_OVERRIDDEN) {
|
||||
return render(404, "pug/friendlyerror.pug", {
|
||||
statusCode: 404,
|
||||
title: "Not found",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue