fix: handling error

This commit is contained in:
kawamataryo 2024-12-03 22:08:08 +09:00
parent f2f085e844
commit 3afb988578
2 changed files with 6 additions and 2 deletions

View File

@ -30,7 +30,7 @@ export class ThreadsService extends AbstractService {
if (!isTargetPage) {
return [
false,
"Error: Invalid page. please open the following or followers view.",
"Invalid page. please open the following or followers view.",
];
}
return [true, ""];

View File

@ -181,7 +181,11 @@ function IndexPopup() {
name: messageName,
});
if (hasError) {
setErrorMessage(errorMessage, DOCUMENT_LINK.OTHER_ERROR);
if (errorMessage.includes("Invalid page")) {
setErrorMessage(errorMessage, DOCUMENT_LINK.PAGE_ERROR);
} else {
setErrorMessage(errorMessage, DOCUMENT_LINK.OTHER_ERROR);
}
return;
}