{"record":{"id":"c56e63c3b7a025a3","repo":"qishibo/AnotherRedisDesktopManager","slug":"e-message-c56e63","errorCode":null,"errorMessage":"e.message","messagePattern":"e\\.message","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/components/contents/KeyContentReJson.vue","lineNumber":68,"sourceCode":"      }\n\n      this.client.call('JSON.SET', [this.redisKey, '$', content]).then((reply) => {\n        if (reply === 'OK') {\n          this.setTTL();\n          this.initShow();\n\n          this.$message.success({\n            message: this.$t('message.modify_success'),\n            duration: 1000,\n          });\n        } else {\n          this.$message.error({\n            message: this.$t('message.modify_failed'),\n            duration: 1000,\n          });\n        }\n      }).catch((e) => {\n        this.$message.error(e.message);\n      });\n    },\n    setTTL() {\n      const ttl = parseInt(this.$parent.$parent.$refs.keyHeader.keyTTL);\n\n      if (ttl > 0) {\n        this.client.expire(this.redisKey, ttl).catch((e) => {\n          this.$message.error(`Expire Error: ${e.message}`);\n        }).then((reply) => {});\n      }\n    },\n    initShortcut() {\n      this.$shortcut.bind('ctrl+s, ⌘+s', this.hotKeyScope, () => {\n        // make input blur to fill the new value\n        // this.$refs.saveBtn.$el.focus();\n        this.execSave();\n\n        return false;","sourceCodeStart":50,"sourceCodeEnd":86,"githubUrl":"https://github.com/qishibo/AnotherRedisDesktopManager/blob/c149855106628babcdfb7675a8e7ba9434d2492a/src/components/contents/KeyContentReJson.vue#L50-L86","documentation":"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'.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"const type = await client.call('TYPE', key);\nif (type !== 'ReJSON-JSON' && type !== 'ReJSON-RL') {\n  return this.$message.error(`Key type is ${type}, not a RedisJSON document`);\n}","typeGuard":null,"tryCatchPattern":"client.call('JSON.SET', key, '$', content).catch((e) => {\n  if (/wrong Redis type|WRONGTYPE/i.test(e.message)) {\n    this.$message.error('Key was overwritten by a non-JSON type; delete or rename it first');\n  } else if (/unknown command/i.test(e.message)) {\n    this.$message.error('RedisJSON module is not loaded');\n  } else {\n    this.$message.error(e.message);\n  }\n});","preventionTips":["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"],"tags":["redis","redisjson","ioredis","wrongtype","vue"],"backgroundTag":"redis-command-error","analyzedSha":"c149855106628babcdfb7675a8e7ba9434d2492a","analyzedAt":"2026-08-22T09:06:28.613Z","schemaVersion":2},"datasetVersion":"2026-08-22T09:17:25.309Z"}