{"record":{"id":"51dd0906083ad5be","repo":"qishibo/AnotherRedisDesktopManager","slug":"e-message-51dd09","errorCode":null,"errorMessage":"e.message","messagePattern":"e\\.message","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/components/contents/KeyContentString.vue","lineNumber":69,"sourceCode":"        content,\n      ).then((reply) => {\n        if (reply === 'OK') {\n          // for compatibility, use expire instead of setex\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":51,"sourceCodeEnd":87,"githubUrl":"https://github.com/qishibo/AnotherRedisDesktopManager/blob/c149855106628babcdfb7675a8e7ba9434d2492a/src/components/contents/KeyContentString.vue#L51-L87","documentation":"Promise catch for the SET that persists edited string content; it toasts the raw error message. Typical causes: WRONGTYPE (the key's type changed since the viewer opened), WRONGPASS/NOAUTH, READONLY (writing to a replica), OOM (maxmemory with noeviction), or the connection dropping mid-save.","triggerScenarios":"Editing a string whose type was changed concurrently (recreated as a hash elsewhere), saving to a read-only replica, server at maxmemory with noeviction policy, ACL user lacking the set command, connection reset during save.","commonSituations":"Two tools editing the same key, connected to a replica for writes, memory-full production instances, fine-grained ACLs.","solutions":["Re-check the key type (TYPE key) and reload the tab before saving","Write to the master, not a replica","Free memory or adjust maxmemory-policy, then retry","Verify the connection's auth/ACL grants the set command"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// re-validate type right before saving an edited string\nconst type = await client.type(key);\nif (type !== 'string') {\n  showError(`key changed to ${type} - reload before saving`);\n  return;\n}","typeGuard":null,"tryCatchPattern":"// classify the failure so the user gets an actionable message\ntry {\n  await client.set(key, value);\n} catch (e) {\n  if (e.message.startsWith('WRONGTYPE')) promptReload();\n  else if (e.message.startsWith('READONLY')) promptSwitchToMaster();\n  else if (e.message.includes('OOM')) promptMemoryCheck();\n  else showError(e.message);\n}","preventionTips":["Reload the key before saving if other tools may have modified it","Never point write-heavy GUI work at a replica","Watch maxmemory: noeviction turns saves into OOM errors under pressure"],"tags":["redis","wrongtype","readonly-replica","oom","ardm"],"backgroundTag":"redis-command-error","analyzedSha":"c149855106628babcdfb7675a8e7ba9434d2492a","analyzedAt":"2026-08-22T09:06:28.613Z","schemaVersion":2},"datasetVersion":"2026-08-22T09:17:25.309Z"}