SillyTavern/SillyTavern · warning · Error
Handles do not match
Error message
Handles do not match
What it means
Thrown in `deleteUser` when the handle typed into the confirmation dialog (`confirmHandle`) does not equal the target `handle`. Deletion requires the user to retype the exact handle as confirmation.
Source
Thrown at public/scripts/user.js:373
const template = $(await renderTemplateAsync('deleteUser'));
template.find('#deleteUserName').text(handle);
template.find('input[name="deleteUserData"]').on('input', function () {
purge = $(this).is(':checked');
});
template.find('input[name="deleteUserHandle"]').on('input', function () {
confirmHandle = String($(this).val());
});
const result = await callGenericPopup(template, POPUP_TYPE.CONFIRM, '', { okButton: 'Delete', cancelButton: 'Cancel', wide: false, large: false });
if (result !== POPUP_RESULT.AFFIRMATIVE) {
throw new Error('Delete user cancelled');
}
if (handle !== confirmHandle) {
toastr.error('Handles do not match', 'Failed to delete user');
throw new Error('Handles do not match');
}
const response = await fetch('/api/users/delete', {
method: 'POST',
headers: getRequestHeaders(),
body: JSON.stringify({ handle, purge }),
});
if (!response.ok) {
const data = await response.json();
toastr.error(data.error || 'Unknown error', 'Failed to delete user');
throw new Error('Failed to delete user');
}
toastr.success('User deleted successfully', 'User Deleted');
callback();
} catch (error) {
console.error('Error deleting user:', error);View on GitHub (pinned to 8172dcd0ee)
Solutions
- Type the exact handle (the comparison is case-sensitive).
- Trim whitespace from the confirmation value before comparing.
- If scripted and confirmation is not wanted, skip the popup and POST to `/api/users/delete` directly.
Example fix
// before
if (handle !== confirmHandle) throw new Error('Handles do not match');
// after
if (handle !== confirmHandle.trim()) throw new Error('Handles do not match'); Defensive patterns
Strategy: validation
Validate before calling
if (handle !== confirmHandle.trim()) throw new Error('Handles do not match'); Prevention
- Trim and compare case-sensitively as the server does.
- Auto-fill the confirmation box and make it read-only for scripted flows.
When it happens
Trigger: User types a different handle in the confirm box; case mismatch; leading/trailing whitespace; the confirm input was left empty or edited after auto-fill.
Common situations: Case-sensitive comparison trips up users; copy-paste introduces whitespace; the dialog's input default changed.
Related errors
- Cannot delete yourself
- Missing required fields
- Invalid handle
- User already exists
- Invalid argument for ${argName} provided. This is not a clos
AI-assisted analysis of SillyTavern/SillyTavern@8172dcd0ee (2026-08-13).
Data as JSON: /api/errors/292a5b25371daa4b.
Report an issue: GitHub.