@@ -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
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user