odysseus-dev/odysseus · error · Error
Account creation failed
Error message
Account creation failed
What it means
Fallback error during initial setup or signup in login.html. POST /api/auth/setup or /api/auth/signup returning non-2xx throws with data.detail when available, otherwise this generic message which is shown inline and stops the auto-login flow.
Source
Thrown at static/login.html:461
errEl.textContent = 'This username is reserved';
errEl.style.display = 'block';
submitBtn.disabled = false;
return;
}
}
// Setup or signup first
if (mode === 'setup' || mode === 'signup') {
const endpoint = mode === 'setup' ? '/api/auth/setup' : '/api/auth/signup';
try {
const res = await fetch(endpoint, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
credentials: 'same-origin',
body: JSON.stringify({ username, password })
});
const data = await res.json();
if (!res.ok) throw new Error(data.detail || 'Account creation failed');
} catch (err) {
errEl.textContent = err.message;
errEl.style.display = 'block';
submitBtn.disabled = false;
return;
}
}
// Login (auto-login after setup/signup too)
const remember = document.getElementById('remember').checked;
function finishLogin() {
const _rem = document.getElementById('remember').checked;
if (_rem) localStorage.setItem('odysseus-last-user', username);
else localStorage.removeItem('odysseus-last-user');
sessionStorage.removeItem('ody-session-active');
submitBtn.innerHTML = '<span class="login-spinner" aria-hidden="true"></span>';
submitBtn.disabled = true;
Promise.all([View on GitHub (pinned to f9235ebbf1)
Solutions
- Read the inline error text — the server's data.detail (e.g. 'username already taken') replaces this generic message
- If setup already completed, log in instead of re-running setup
- Choose a different username and a policy-compliant password, then retry
- Check the response body in devtools when only the generic message shows
Defensive patterns
Strategy: validation
Validate before calling
if (username.length < 3 || password.length < 8) { errEl.textContent = 'Username ≥3 chars, password ≥8 chars'; return; } Try / catch
try { await createAccount(mode, username, password); } catch (err) { errEl.textContent = err.message; submitBtn.disabled = false; } Prevention
- Prefer the server's data.detail message over the generic fallback for diagnosis
- If setup already ran, use login mode instead of setup
- Validate password policy client-side to reduce round trips
When it happens
Trigger: Setup when an account already exists (409), signup when registration is disabled or the username is taken (403/409), weak/rejected password (400/422 with detail), or non-JSON error body.
Common situations: Revisiting the setup page after the first account was created; duplicate username; password policy violation; proxy intercepting the POST.
Related errors
- Login failed
- detail || ('HTTP ' + res.status)
- d.error || 'Clear failed'
- Failed to save note
- Failed to trigger task (${res.status})
AI-assisted analysis of odysseus-dev/odysseus@f9235ebbf1 (2026-08-14).
Data as JSON: /api/errors/ca29809f51a3515a.
Report an issue: GitHub.