Refactor: Update README to indicate Account Creator is in BETA; improve error messages for recoveryEmail validation

This commit is contained in:
2025-11-08 18:37:32 +01:00
parent 52fbbd79b1
commit ca356075fa
3 changed files with 7 additions and 7 deletions

View File

@@ -362,11 +362,11 @@ export function loadAccounts(): Account[] {
if (recoveryRequired) {
if (typeof a.recoveryEmail !== 'string') {
throw new Error(`account ${a.email || '<unknown>'} must include a recoveryEmail string`)
throw new Error(`account ${a.email || '<unknown>'} must include a recoveryEmail string (or set "recoveryRequired": false)`)
}
a.recoveryEmail = String(a.recoveryEmail).trim()
if (!a.recoveryEmail || !/@/.test(a.recoveryEmail)) {
throw new Error(`account ${a.email} recoveryEmail must be a valid email address`)
throw new Error(`account ${a.email} recoveryEmail must be a valid email address (got: "${a.recoveryEmail}") - set "recoveryRequired": false if not needed`)
}
} else {
if (typeof a.recoveryEmail === 'string' && a.recoveryEmail.trim() !== '') {