Hyeonsang Cho 2cc30714c9
fix(auth): answer 400 when a new email is registered during change-password (#8319)
change-password checks that the new email is free, hashes the new
password, then writes. A /register of the same address that commits in
between makes update_user's commit hit the users.email unique index,
and the IntegrityError reached the client as an unhandled 500.

update_user now reports an email index violation as ValueError, like
create_user does for the same race, and the route maps it to the
existing 400 email_already_exists. Other integrity errors propagate.
2026-11-17 22:02:31 +08:00
..