qishibo/AnotherRedisDesktopManager · warning

this.$t('message.group_exists')

Error message

this.$t('message.group_exists')

What it means

Element UI toast shown when storage.renameGroup(groupForm.id, name) returns false. Per src/storage.js:31-41, renameGroup returns false in three cases: id is falsy, name is falsy, the target group id no longer exists in storage, or another group already has the requested name (groups.some(group => group.name === name)). Since the empty-name case is handled by the previous guard, this message in practice means 'a group with this name already exists' (or the group was deleted in another window between opening the dialog and submitting).

Source

Thrown at src/components/Connections.vue:253

      const groups = [...this.groups];
      groups.splice(newIndex, 0, groups.splice(oldIndex, 1)[0]);
      this.groups = groups;
      storage.setGroups(groups);
    },
    openEditGroupDialog(group) {
      this.groupForm = { id: group.id, name: group.name };
      this.showGroupDialog = true;
    },
    handleGroupSubmit() {
      const name = this.groupForm.name.trim();

      if (!name) {
        return this.$message.error(this.$t('message.group_name_required'));
      }

      if (!storage.renameGroup(this.groupForm.id, name)) {
        return this.$message.error(this.$t('message.group_exists'));
      }

      this.showGroupDialog = false;
      this.$message.success(this.$t('message.modify_success'));
      this.$bus.$emit('groups-updated');
    },
    deleteGroup(groupId) {
      this.$confirm(this.$t('message.delete_group_confirm'), { type: 'warning' }).then(() => {
        storage.deleteGroup(groupId);
        this.$message.success(this.$t('message.delete_success'));
        // reload connections so in-memory groupId is cleared(in connections)
        this.initConnections();
      }).catch(() => {});
    },
    initGroups() {
      this.groups = storage.getGroups();
      this.initSortable();
    },

View on GitHub (pinned to c149855106)

Solutions

  1. Choose a unique group name that no existing group uses
  2. Before submitting, check for duplicates: list groups via the connections sidebar and verify the target name is free
  3. Make renameGroup idempotent by allowing same-name (skip the duplicate check when group.name === name for the same id)
  4. If the error persists with a seemingly fresh name, reload connections (the group list may be stale) and retry

Example fix

// storage.js - allow keeping the same name on rename
if (groups.some(group => group.name === name && group.id !== id)) {
  return false;
}
Defensive patterns

Strategy: validation

Validate before calling

const name = this.groupForm.name.trim();
const groups = this.$store.state.groups || storage.getGroups();
const duplicate = groups.some(g => g.name === name && g.id !== this.groupForm.id);
if (duplicate) {
  this.$message.error(this.$t('message.group_exists'));
  return;
}

Type guard

const isNameFree = (groups, name, ownId) =>
  !groups.some(g => g.name === name && g.id !== ownId);

Prevention

When it happens

Trigger: Opening the edit-group dialog and renaming a group to a name that another saved group already uses; renaming group A to 'default' when group B is already named 'default'; submitting the dialog after the group was deleted concurrently elsewhere so groups.find(id) misses.

Common situations: Reorganizing many similarly-named groups (prod/staging/dev) and hitting a duplicate; syncing connections between two app instances where one instance already created the target name; stale dialog left open after the group was removed elsewhere.

Related errors


AI-assisted analysis of qishibo/AnotherRedisDesktopManager@c149855106 (2026-08-22). Data as JSON: /api/errors/c624f5c6b41035cc. Report an issue: GitHub.