Add unspecified error for when shit hits the fan

This commit is contained in:
Justin Edmund 2024-02-21 19:13:49 -05:00
parent eb1caeff8a
commit 788f8e9990
5 changed files with 14 additions and 6 deletions

View file

@ -399,8 +399,8 @@ export const getServerSideProps = async ({ req, res, locale, query }: { req: Nex
context: null, context: null,
error: true, error: true,
status: { status: {
code: response?.status, code: response ? response.status : -999,
text: response?.statusText, text: response ? response.statusText : 'unspecified_error',
}, },
...(await serverSideTranslations(locale, ['common'])), ...(await serverSideTranslations(locale, ['common'])),
}, },

View file

@ -429,8 +429,8 @@ export const getServerSideProps = async ({ req, res, locale, query }: { req: Nex
context: null, context: null,
error: true, error: true,
status: { status: {
code: response?.status, code: response ? response.status : -999,
text: response?.statusText, text: response ? response.statusText : 'unspecified_error',
}, },
...(await serverSideTranslations(locale, ['common'])), ...(await serverSideTranslations(locale, ['common'])),
}, },

View file

@ -438,8 +438,8 @@ export const getServerSideProps = async ({ req, res, locale, query }: { req: Nex
context: null, context: null,
error: true, error: true,
status: { status: {
code: response?.status, code: response ? response.status : -999,
text: response?.statusText, text: response ? response.statusText : "unspecified_error",
}, },
...(await serverSideTranslations(locale, ['common'])), ...(await serverSideTranslations(locale, ['common'])),
}, },

View file

@ -123,6 +123,10 @@
"unauthorized": { "unauthorized": {
"title": "Unauthorized", "title": "Unauthorized",
"description": "You don't have permission to perform that action" "description": "You don't have permission to perform that action"
},
"unspecified_error": {
"title": "Something went wrong",
"description": "You shouldn't see this message. Please try again later."
} }
}, },
"filters": { "filters": {

View file

@ -123,6 +123,10 @@
"unauthorized": { "unauthorized": {
"title": "権限がありません", "title": "権限がありません",
"description": "行ったアクションを実行する権限がありません" "description": "行ったアクションを実行する権限がありません"
},
"unspecified_error": {
"title": "エラー",
"description": "エラーが発生しました"
} }
}, },
"filters": { "filters": {