Enhances code documentation and structure for plugin #3

Merged
AlexKucera merged 20 commits from docstrings into master 2025-10-25 10:50:22 +02:00
Showing only changes of commit c5ebfceea6 - Show all commits
+6 -2
View File
@@ -81,10 +81,14 @@ export class CleanupCommand {
new Notice('API key error. Please check your settings.'); new Notice('API key error. Please check your settings.');
} else if (error instanceof TextTooLongError) { } else if (error instanceof TextTooLongError) {
new Notice(error.message); new Notice(error.message);
} else if (error instanceof ApiError && (error.status === 401 || error.status === 403)) { } else if (error instanceof ApiError) {
if (error.status === 401 || error.status === 403) {
new Notice('API key was rejected by the server. Please verify your key.'); new Notice('API key was rejected by the server. Please verify your key.');
} else if (error instanceof ApiError && error.status === 429) { } else if (error.status === 429) {
new Notice('Rate limited by API. Please wait and try again.'); new Notice('Rate limited by API. Please wait and try again.');
} else {
new Notice(`API error (${error.status}): ${error.message}`);
}
} else if (error instanceof ServiceUnavailableError) { } else if (error instanceof ServiceUnavailableError) {
new Notice(error.message); new Notice(error.message);
} else if (error instanceof InvalidResponseError) { } else if (error instanceof InvalidResponseError) {