Add unspecified error for when shit hits the fan
This commit is contained in:
parent
eb1caeff8a
commit
788f8e9990
5 changed files with 14 additions and 6 deletions
|
|
@ -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'])),
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -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'])),
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -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'])),
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -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": {
|
||||||
|
|
|
||||||
|
|
@ -123,6 +123,10 @@
|
||||||
"unauthorized": {
|
"unauthorized": {
|
||||||
"title": "権限がありません",
|
"title": "権限がありません",
|
||||||
"description": "行ったアクションを実行する権限がありません"
|
"description": "行ったアクションを実行する権限がありません"
|
||||||
|
},
|
||||||
|
"unspecified_error": {
|
||||||
|
"title": "エラー",
|
||||||
|
"description": "エラーが発生しました"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"filters": {
|
"filters": {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue