qishibo/AnotherRedisDesktopManager · error

Rename Error: ${e.message}

Error message

Rename Error: ${e.message}

What it means

KeyHeader.vue rename flow: client.rename(redisKey, keyName) rejection shows 'Rename Error: <e.message>'. Two concrete causes: RENAME is in the app's writeCMD table, so a readonly connection rejects client-side; and the server returns 'ERR no such key' when the SOURCE key no longer exists (RENAME requires an existing source; an existing target is fine - it gets overwritten).

Source

Thrown at src/components/KeyHeader.vue:184

          new: this.$util.bufToString(this.keyName),
        }), {
          inputValidator: value => ((value == inputTxt) ? true : placeholder),
          inputPlaceholder: placeholder,
        }
      ).then(() => {
        this.client.rename(this.redisKey, this.keyName).then((reply) => {
          if (reply === 'OK') {
            this.$message.success({
              message: this.$t('message.modify_success'),
              duration: 1000,
            });

            this.refreshKeyList(this.redisKey);
            this.refreshKeyList(this.keyName, 'add');
            this.$bus.$emit('clickedKey', this.client, this.keyName);
          }
        }).catch((e) => {
          this.$message.error(`Rename Error: ${e.message}`);
        });
      }).catch(() => {});
    },
    ttlKey() {
      // -1 persist key
      if (this.keyTTL == -1) {
        return this.persistKey();
      }

      // ttl <= 0
      if (this.keyTTL <= 0) {
        this.$confirm(
          this.$t('message.ttl_delete'),
          { type: 'warning' },
        )
          .then(() => {
            this.setTTL(true);
          })

View on GitHub (pinned to c149855106)

Solutions

  1. Refresh the key / key list and confirm the source key still exists (EXISTS) before renaming.
  2. If the readonly-mode message appears, disable Readonly and reconnect.
  3. If 'NOPERM', grant +rename to the ACL user.

Example fix

// before
this.client.rename(this.redisKey, this.keyName).catch(e => this.$message.error(`Rename Error: ${e.message}`));

// after - verify the source key still exists first
this.client.exists(this.redisKey).then((exists) => {
  if (!exists) { this.$bus.$emit('removePreTab'); return; }
  return this.client.rename(this.redisKey, this.keyName);
}).catch(e => this.$message.error(`Rename Error: ${e.message}`));
Defensive patterns

Strategy: validation

Validate before calling

// source key must exist for RENAME - check first
const exists = await client.exists(this.redisKey);
if (!exists) { this.$bus.$emit('removePreTab'); this.refreshKeyList(this.redisKey); return; }

Type guard

const isSourceMissing = (e) => /no such key/i.test(e.message);

Try / catch

this.client.rename(this.redisKey, this.keyName).catch((e) => {
  if (isSourceMissing(e)) {
    // key expired/deleted elsewhere: close the tab, refresh - do not retry the rename
    this.$bus.$emit('removePreTab');
  } else if (/readonly mode|NOPERM/i.test(e.message)) {
    this.$message.error('Rename not permitted (readonly connection or ACL)');
  } else {
    this.$message.error(`Rename Error: ${e.message}`);
  }
});

Prevention

When it happens

Trigger: Renaming on a readonly connection (client-side guard); the open key expired or was deleted elsewhere before rename (server 'no such key'); ACL NOPERM for +rename/@write; connection dropped mid-dialog.

Common situations: Renaming a short-TTL key after it expired; the key deleted from another session while the tab was open; readonly prod connections.

Related errors


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