fix: show 404 page if /api/v2/meta/page/{page} can't find a file

This commit is contained in:
sam 2025-02-23 21:42:01 +01:00
parent 0c6e3bf38f
commit c8e4078b35
Signed by: sam
GPG key ID: B4EF20DDE721CAA1
6 changed files with 17 additions and 9 deletions

View file

@ -43,6 +43,7 @@ export enum ErrorCode {
MemberNotFound = "MEMBER_NOT_FOUND",
AccountAlreadyLinked = "ACCOUNT_ALREADY_LINKED",
LastAuthMethod = "LAST_AUTH_METHOD",
PageNotFound = "PAGE_NOT_FOUND",
// This code isn't actually returned by the API
Non204Response = "(non 204 response)",
}

View file

@ -29,6 +29,8 @@ export default function errorDescription(t: TranslateFn, code: ErrorCode): strin
return t("error.account-already-linked");
case ErrorCode.LastAuthMethod:
return t("error.last-auth-method");
case ErrorCode.PageNotFound:
return t("error.page-not-found");
case ErrorCode.Non204Response:
return t("error.generic-error");
}

View file

@ -120,7 +120,8 @@
"400-description": "Something went wrong with your request. This error should never land you on this page, so it's probably a bug.",
"500-description": "Something went wrong on the server. Please try again later.",
"unknown-status-description": "Something went wrong, but we're not sure what. Please try again.",
"error-id": "If you report this error to the developers, please give them this ID:"
"error-id": "If you report this error to the developers, please give them this ID:",
"page-not-found": "No page exists at this URL."
},
"settings": {
"general-information-tab": "General information",