Handle SessionLost when deleting your own account

Deleting your own account now terminates the session immediately, so the
web UI received a SessionLost rejection and reported "Error deleting
user" for a delete that had succeeded. Use the same branch revoke does.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
bbassieandClaude Opus 5 committed 2026-09-13 13:34:58 +00:00
1 parent 1da7c1da67
commit c9e8aeee5c
1 file changed
+7
@@ -146,6 +146,13 @@ export default function UserViewPage() {
new lib.UserDeleteRequest(userName)
).then(() => {
navigate("/users");
}, err => {
if (err instanceof lib.SessionLost && userName === account.name) {
// Got kicked out after deleting our own account
navigate("/users");
return;
}
throw err;
}).catch(notifyErrorHandler("Error deleting user"));
}}
>