diff --git a/src/locales/en.json b/src/locales/en.json index 570acfa26..47906d88b 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -483,6 +483,9 @@ "success": "You're on the list! We'll notify you first.", "alreadyRegistered": "You're already on the waitlist.", "error": "Registration failed. Please try again.", + "errorRateLimit": "Too many attempts. Please try again in an hour.", + "errorServiceUnavailable": "Registration service is temporarily unavailable.", + "errorNetwork": "Network error. Check your connection and try again.", "invalidEmail": "Please enter a valid email address." }, "byokTitle": "Or bring your own keys", diff --git a/src/settings-main.ts b/src/settings-main.ts index b9af834dc..c70cf0255 100644 --- a/src/settings-main.ts +++ b/src/settings-main.ts @@ -300,12 +300,18 @@ function initOverviewListeners(area: HTMLElement): void { ? t('modals.settingsWindow.worldMonitor.register.alreadyRegistered') : t('modals.settingsWindow.worldMonitor.register.success'); regStatus.className = 'wm-reg-status ok'; + } else if (res.status === 429) { + regStatus.textContent = t('modals.settingsWindow.worldMonitor.register.errorRateLimit'); + regStatus.className = 'wm-reg-status error'; + } else if (res.status === 503) { + regStatus.textContent = t('modals.settingsWindow.worldMonitor.register.errorServiceUnavailable'); + regStatus.className = 'wm-reg-status error'; } else { regStatus.textContent = data.error || t('modals.settingsWindow.worldMonitor.register.error'); regStatus.className = 'wm-reg-status error'; } } catch { - regStatus.textContent = t('modals.settingsWindow.worldMonitor.register.error'); + regStatus.textContent = t('modals.settingsWindow.worldMonitor.register.errorNetwork'); regStatus.className = 'wm-reg-status error'; } finally { btn.disabled = false;