qishibo/AnotherRedisDesktopManager · error
e.message
Error message
e.message
What it means
The JSON.SET promise rejected: the server refused the command outright. Common messages: 'Existing key has wrong Redis type'/WRONGTYPE when the key holds a non-document type, 'unknown command JSON.SET' when the module is not loaded, document-depth/size limit errors from RedisJSON, or an ioredis connection failure such as 'Connection is closed'.
Source
Thrown at src/components/contents/KeyContentReJson.vue:68
}
this.client.call('JSON.SET', [this.redisKey, '$', content]).then((reply) => {
if (reply === 'OK') {
this.setTTL();
this.initShow();
this.$message.success({
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;View on GitHub (pinned to c149855106)
Solutions
- Run TYPE on the key; if it is not a ReJSON type, delete or rename the stale key before saving
- Confirm the module is loaded with MODULE LIST (otherwise JSON.SET is an unknown command)
- If the message is connection-level, reconnect and retry the save
Defensive patterns
Strategy: try-catch
Validate before calling
const type = await client.call('TYPE', key);
if (type !== 'ReJSON-JSON' && type !== 'ReJSON-RL') {
return this.$message.error(`Key type is ${type}, not a RedisJSON document`);
} Try / catch
client.call('JSON.SET', key, '$', content).catch((e) => {
if (/wrong Redis type|WRONGTYPE/i.test(e.message)) {
this.$message.error('Key was overwritten by a non-JSON type; delete or rename it first');
} else if (/unknown command/i.test(e.message)) {
this.$message.error('RedisJSON module is not loaded');
} else {
this.$message.error(e.message);
}
}); Prevention
- Check TYPE before JSON.SET on any key you did not create in this session
- Verify with MODULE LIST that RedisJSON is loaded when connecting to a new server
- Keep edited content in the dialog on failure so nothing is lost after a reconnect-and-retry
When it happens
Trigger: Saving a ReJSON tab after the key was overwritten with SET to a plain string; embedding RedisJSON with a nesting depth beyond the module limit; issuing the save right as the connection drops; server without the RedisJSON module.
Common situations: Mixed-type recycling of key names between apps; switching a connection to a replica or a different server that lacks the module; editing very large nested documents.
Related errors
- err.message
- this.$t('message.modify_failed')
- Expire Error: ${e.message}
- Sentinel & Cluster cannot be checked together!
- message || this.$t('message.test_connection_failed')
AI-assisted analysis of qishibo/AnotherRedisDesktopManager@c149855106 (2026-08-22).
Data as JSON: /api/errors/c56e63c3b7a025a3.
Report an issue: GitHub.