fix: show action limit message

close #1360
This commit is contained in:
Stephen Zhou
2024-11-05 01:46:36 +08:00
parent 7c4c42bdf5
commit 2ac52ebda3
2 changed files with 7 additions and 2 deletions
+4 -1
View File
@@ -42,7 +42,10 @@ export const toastFetchError = (
if (error instanceof FetchError) {
try {
const json = JSON.parse(error.response?._data)
const json =
typeof error.response?._data === "string"
? JSON.parse(error.response?._data)
: error.response?._data
const { reason, code, message: _message } = json
message = _message
+3 -1
View File
@@ -1,6 +1,7 @@
{
"1": "Previous operation is not completed",
"2": "CSRF Token mismatch",
"3": "Unprocessable content",
"1000": "Unauthorized",
"1001": "create session failed",
"1002": "Invalid parameter",
@@ -50,5 +51,6 @@
"10001": "Inbox already exists",
"10002": "Inbox limit exceeded",
"10003": "Inbox permission denied",
"11000": "RSSHub route not found"
"11000": "RSSHub route not found",
"12000": "Action limit exceeded"
}