qishibo/AnotherRedisDesktopManager · error

Persist Error: ${e.message}

Error message

Persist Error: ${e.message}

What it means

Wraps a rejection of the Redis PERSIST command issued by persistKey() (this.client.persist(this.redisKey)), which strips the TTL from the current key. PERSIST never rejects for a missing key (it resolves 0), so a rejection means the command could not run or complete: the connection is down/reconnecting, auth is wrong (NOAUTH / ERR invalid password), the target is a read-only replica (READONLY), or the client flushed its command queue on disconnect. The raw driver message is appended so the exact cause stays visible.

Source

Thrown at src/components/KeyHeader.vue:230

            message: this.$t('message.modify_success'),
            duration: 1000,
          });

          if (keyDeleted) {
            this.refreshKeyList(this.redisKey);
            this.$bus.$emit('removePreTab');
          }
        }
      }).catch((e) => {
        this.$message.error(`Expire Error: ${e.message}`);
      });
    },
    persistKey() {
      this.client.persist(this.redisKey).then(() => {
        this.initShow();
        this.$message.success(this.$t('message.modify_success'));
      }).catch((e) => {
        this.$message.error(`Persist Error: ${e.message}`);
      });
    },
    refreshKeyList(key, type = 'del') {
      this.$bus.$emit('refreshKeyList', this.client, key, type);
    },
    initShortcut() {
      // refresh
      this.$shortcut.bind('ctrl+r, ⌘+r, f5', this.hotKeyScope, () => {
        // make input blur first
        this.$refs.deleteBtn.$el.focus();
        this.refreshKey();

        return false;
      });
      // delete
      this.$shortcut.bind('ctrl+d, ⌘+d', this.hotKeyScope, () => {
        this.deleteKey();
        return false;

View on GitHub (pinned to c149855106)

Solutions

  1. Confirm the connection is healthy before issuing the command: check client.status === 'ready' or run a PING; reconnect if not
  2. If auth changed, edit the saved connection password and reconnect (NOAUTH / ERR invalid password)
  3. If targeting a replica, connect to the primary or set replica-read-only no on the server
  4. Keep the .catch and map known messages (NOAUTH, READONLY, ECONNRESET) to actionable UI text with a reconnect action

Example fix

// before
this.client.persist(this.redisKey).then(() => {
  this.initShow();
}).catch((e) => {
  this.$message.error(`Persist Error: ${e.message}`);
});

// after
if (this.client.status !== 'ready') {
  this.$message.error(this.$t('message.not_connected'));
  return;
}
this.client.persist(this.redisKey).then(() => {
  this.initShow();
}).catch((e) => {
  const msg = /NOAUTH|invalid password/i.test(e.message) ? this.$t('message.auth_failed')
    : /READONLY/i.test(e.message) ? this.$t('message.readonly_replica')
    : e.message;
  this.$message.error(`Persist Error: ${msg}`);
});
Defensive patterns

Strategy: try-catch

Validate before calling

if (this.client.status !== 'ready') {
  this.$message.error(this.$t('message.not_connected'));
  return;
}

Try / catch

.catch((e) => {
  const m = String(e.message || e);
  if (/NOAUTH|invalid password/i.test(m)) { /* prompt re-auth */ }
  else if (/READONLY/i.test(m)) { /* route to primary */ }
  else if (/ECONNRESET|ECONNREFUSED|closed/i.test(m)) { /* reconnect and retry */ }
  else { this.$message.error(`Persist Error: ${m}`); }
})

Prevention

When it happens

Trigger: Clicking the remove-TTL (persist) action in the key header right after the socket dropped (sleep/resume, VPN switch); issuing it against a replica with replica-read-only yes; after the Redis password was rotated so queued commands fail with NOAUTH; server restarted mid-request.

Common situations: Laptop sleep/resume killing idle TCP sockets, load balancers/firewalls reaping idle connections, managed Redis (ElastiCache/Azure) endpoints mid-failover, read-replica connections used for writes.

Related errors


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