qishibo/AnotherRedisDesktopManager · error
Expire Error: ${e.message}
Error message
Expire Error: ${e.message} What it means
setTTL() reads the TTL field from the key header (parseInt) and, when it is > 0, issues EXPIRE immediately after the SET that saved the content; failures toast 'Expire Error: <message>'. Note that non-numeric input parses to NaN, which silently skips the EXPIRE (ttl > 0 is false) - so this toast means the command actually ran and failed (connection lost, ACL denial, failover), not malformed input.
Source
Thrown at src/components/contents/KeyContentString.vue:77
message: this.$t('message.modify_success'),
duration: 1000,
});
} else {
this.$message.error({
message: this.$t('message.modify_failed'),
duration: 1000,
});
}
}).catch((e) => {
this.$message.error(e.message);
});
},
setTTL() {
const ttl = parseInt(this.$parent.$parent.$refs.keyHeader.keyTTL);
if (ttl > 0) {
this.client.expire(this.redisKey, ttl).catch((e) => {
this.$message.error(`Expire Error: ${e.message}`);
}).then((reply) => {});
}
},
initShortcut() {
this.$shortcut.bind('ctrl+s, ⌘+s', this.hotKeyScope, () => {
// make input blur to fill the new value
// this.$refs.saveBtn.$el.focus();
this.execSave();
return false;
});
},
dumpCommand() {
const command = `SET ${this.$util.bufToQuotation(this.redisKey)} ${
this.$util.bufToQuotation(this.content)}`;
this.$util.copyToClipboard(command);
this.$message.success({ message: this.$t('message.copy_success'), duration: 800 });
},View on GitHub (pinned to c149855106)
Solutions
- Reconnect and retry the whole save - SET and EXPIRE here are not atomic
- If ACL-managed, grant the expire command (or +@write) to the connection user
- Verify both steps applied with TTL key after saving
Defensive patterns
Strategy: try-catch
Validate before calling
// sanitize TTL input before issuing EXPIRE (NaN currently skips silently)
const parsed = Number.parseInt(String(keyTTL).trim(), 10);
if (!Number.isInteger(parsed) || parsed <= 0) {
return; // no TTL intended, or fix the input field
}
await client.expire(key, parsed); Try / catch
// treat SET+EXPIRE as one unit; report which half failed
try {
await client.set(key, value);
} catch (e) { showError(`Set Error: ${e.message}`); return; }
try {
await client.expire(key, ttl);
} catch (e) { showError(`Expire Error: ${e.message}`); } Prevention
- ACL users need both set and expire (or +@write) for save-with-TTL to fully succeed
- SET and EXPIRE here are two round-trips - a key deleted in between silently keeps no TTL
- Verify with TTL key after saving to confirm the expiry actually attached
When it happens
Trigger: Connection dropping between the SET and the follow-up EXPIRE; ACL user allowed set but not expire (command-category restrictions); server failover mid-save. EXPIRE on a key deleted in between returns 0, which is not an error and is swallowed by the empty .then.
Common situations: Fine-grained ACLs on shared servers, flaky links to remote Redis, save+TTL racing with another client deleting the key.
Related errors
- Expire Error: ${e.message}
- Exists Error: ${e.message}
- Expire Error: ${e.message}
- Persist Error: ${e.message}
- this.$t('message.info_disabled')
AI-assisted analysis of qishibo/AnotherRedisDesktopManager@c149855106 (2026-08-22).
Data as JSON: /api/errors/67e96c85de3edca6.
Report an issue: GitHub.