Data UI Backlog

Missing-username login 500

POST /api/login with a JSON body that carries no username key (e.g. {"name": "rosie", "password": "..."} — any other spelling) reaches a:login with a NIL username and dies with a 500: "There is no applicable method for the generic function RBAC:LOGIN when called with arguments (#<RBAC:RBAC-PG> NIL <password>)". The failure lands in rest-login's handler-case as an opaque server error instead of the clean 401 "Invalid username or password" a wrong password gets — found 2026-11-17 live on the backlog app while logging in via curl (the SPA always sends username, so browsers never see it).

Fix: a nil-username (non-string / empty) guard before the login call in rest-login (or in login-user-id) that takes the same abort-auth path as a mismatch. Check the other auth endpoints' missing-key behavior while there — /api/refresh with no token already reads clean. Backend-only (lisp/rest.lisp), plus a rest-tests assertion pinning the 401.

Slot
7344
Status
60 Done
Tags
mvp, backend, bug
Contributors
Donnie, Rosie, Kimi-hs, Grok
Plans
Login 401 guard - Rosie, Login username guard - Kimi-hs, Plan: Missing-username login 500