qishibo/AnotherRedisDesktopManager · error
Expire Error: ${e.message}
Error message
Expire Error: ${e.message} What it means
KeyHeader.vue TTL flow: when the edited TTL is applied, client.expire/persist (EXPIRE, PERSIST are both in the app's writeCMD table) rejecting shows 'Expire Error: <e.message>'. On a readonly connection the client-side guard rejects before the server is contacted; otherwise the cause is ACL NOPERM or a dropped connection. Note EXPIRE returns 0 (not an error) when the key is missing, so 'no such key' is not the issue here.
Source
Thrown at src/components/KeyHeader.vue:222
} else {
this.setTTL();
}
},
setTTL(keyDeleted = false) {
this.client.expire(this.redisKey, this.keyTTL).then((reply) => {
if (reply == 1) {
this.$message.success({
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();View on GitHub (pinned to c149855106)
Solutions
- If the readonly-mode message appears, disable Readonly in the connection config and reconnect.
- If 'NOPERM', grant +expire +persist (or +@write) to the ACL user.
- If connection-related, reconnect and re-apply the TTL.
Defensive patterns
Strategy: try-catch
Validate before calling
import { writeCMD } from '@/commands.js';
// EXPIRE/PERSIST are writeCMD entries - readonly blocks them client-side
const ttlBlocked = client.options.connectionReadOnly && (writeCMD['EXPIRE'] || writeCMD['PERSIST']); Type guard
const isWriteDenied = (e) => /readonly mode|NOPERM|not allowed/i.test(e.message);
Try / catch
this.client.expire(this.redisKey, seconds).catch((e) => {
if (isWriteDenied(e)) {
this.$message.error('TTL change not permitted (readonly connection or ACL)');
} else {
this.$message.error(`Expire Error: ${e.message}`);
}
}); Prevention
- Disable TTL-editing UI on readonly connections - EXPIRE and PERSIST are both in writeCMD.
- Remember EXPIRE on a missing key returns 0 without error; an error here means permission or connection, not a missing key.
When it happens
Trigger: Setting a TTL or clicking persist on a readonly-configured connection; ACL user without +expire/@write; auto-refresh firing EXPIRE after the connection dropped.
Common situations: Trying to make a key persistent or set expiry on production with readonly enabled; restricted ACL accounts; network changes while the key tab is open.
Related errors
AI-assisted analysis of qishibo/AnotherRedisDesktopManager@c149855106 (2026-08-22).
Data as JSON: /api/errors/085093510cb8c9b1.
Report an issue: GitHub.