{"record":{"id":"d187c222887c9dc1","repo":"qishibo/AnotherRedisDesktopManager","slug":"ttl-error-e-message","errorCode":null,"errorMessage":"TTL Error: ${e.message}","messagePattern":"TTL Error: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/components/KeyHeader.vue","lineNumber":99,"sourceCode":"      binary: false,\n      autoRefresh: false,\n      refreshInterval: 2000,\n    };\n  },\n  props: ['client', 'redisKey', 'keyType', 'hotKeyScope'],\n  methods: {\n    initShow() {\n      const key = this.redisKey;\n      const { client } = this;\n\n      // reset name input\n      this.keyName = key;\n      this.binary = !this.$util.bufVisible(key);\n\n      client.ttl(key).then((reply) => {\n        this.keyTTL = reply;\n      }).catch((e) => {\n        this.$message.error(`TTL Error: ${e.message}`);\n      });\n    },\n    changeKeyInput(keyInput) {\n      this.keyName = this.binary ? this.$util.xToBuffer(keyInput) : Buffer.from(keyInput);\n    },\n    refreshKey() {\n      this.initShow();\n      this.$emit('refreshContent');\n    },\n    refreshInit() {\n      this.refreshTimer && clearInterval(this.refreshTimer);\n\n      if (this.autoRefresh) {\n        this.refreshKey();\n\n        this.refreshTimer = setInterval(() => {\n          this.refreshKey();\n        }, this.refreshInterval);","sourceCodeStart":81,"sourceCodeEnd":117,"githubUrl":"https://github.com/qishibo/AnotherRedisDesktopManager/blob/c149855106628babcdfb7675a8e7ba9434d2492a/src/components/KeyHeader.vue#L81-L117","documentation":"KeyHeader.vue calls client.ttl(key) when a key tab is opened or refreshed (including via the auto-refresh timer); a rejection shows 'TTL Error: <e.message>'. TTL is a read command and not in the writeCMD table, so readonly never causes this - the usual causes are a connection that has been closed (timer firing after a disconnect) or an ACL restriction on @read.","triggerScenarios":"Auto-refresh timer firing after the connection dropped (VPN change, server restart); key tab left open across a sleep/resume; ACL user denied TTL (-ttl / missing @read).","commonSituations":"Laptop sleep/resume with key tabs open; server restart during browsing; restrictive ACL users.","solutions":["Reconnect - the tab re-fetches TTL on initShow/refreshKey.","Close stale key tabs after network changes to stop the refresh timer from firing on a dead connection.","If 'NOPERM', grant the ACL user +ttl or +@read."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// stop the auto-refresh timer when the connection status is unknown\nif (client.status !== 'ready') { this.refreshTimer && clearInterval(this.refreshTimer); return; }","typeGuard":null,"tryCatchPattern":"client.ttl(key).then((reply) => { this.keyTTL = reply; }).catch((e) => {\n  // non-fatal: blank the TTL display instead of alarming the user on a dead connection\n  this.keyTTL = null;\n  this.$message.error(`TTL Error: ${e.message}`);\n});","preventionTips":["Check client.status === 'ready' before letting refresh timers fire.","Clear per-tab refresh timers on connection close events."],"tags":["ttl","connection-loss","auto-refresh","key-detail"],"backgroundTag":"connection-lost-during-operation","analyzedSha":"c149855106628babcdfb7675a8e7ba9434d2492a","analyzedAt":"2026-08-22T09:06:28.613Z","schemaVersion":2},"datasetVersion":"2026-08-22T09:17:25.309Z"}