{"record":{"id":"7a597005e061634f","repo":"qishibo/AnotherRedisDesktopManager","slug":"type-error-e-message","errorCode":null,"errorMessage":"Type Error: ${e.message}","messagePattern":"Type Error: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/components/Tabs.vue","lineNumber":211,"sourceCode":"      };\n\n      this.addTab(newTabItem, true);\n    },\n    addKeyTab(client, key, newTab = false) {\n      client.type(key).then((type) => {\n        // key not exists\n        if (type === 'none') {\n          this.$message.error({\n            message: `${key} ${this.$t('message.key_not_exists')}`,\n            duration: 1000,\n          });\n\n          return;\n        }\n\n        this.addTab(this.initKeyTabItem(client, key, type), newTab);\n      }).catch((e) => {\n        this.$message.error(`Type Error: ${e.message}`);\n      });\n    },\n    initKeyTabItem(client, key, type) {\n      const { cutString } = this.$util;\n      const dbIndex = client.condition ? client.condition.select : 0;\n      const { connectionName } = client.options;\n      const keyStr = this.$util.bufToString(key);\n\n      const label = `${cutString(keyStr)} | ${cutString(connectionName)} | DB${dbIndex}`;\n      const name = `${keyStr} | ${connectionName} | DB${dbIndex}`;\n\n      return {\n        name,\n        label,\n        title: name,\n        client,\n        component: 'key',\n        redisKey: key,","sourceCodeStart":193,"sourceCodeEnd":229,"githubUrl":"https://github.com/qishibo/AnotherRedisDesktopManager/blob/c149855106628babcdfb7675a8e7ba9434d2492a/src/components/Tabs.vue#L193-L229","documentation":"The TYPE command itself rejected while resolving a key tab. Unlike the 'none' case (key missing), this means the command failed: connection dropped, NOAUTH/NOPERM under ACL, or protocol/encoding issues (e.g. binary key handling). The raw driver message is shown prefixed with 'Type Error:'.","triggerScenarios":"Socket dropping right as a key tab opens; ACL user without type permission; NOAUTH after a password change; binary/unprintable key names producing command encoding problems.","commonSituations":"Opening tabs right after network transitions, least-privilege ACL users, keys containing arbitrary bytes from serializers (PHP/Java serialized values).","solutions":["Reconnect and retry opening the key","For NOPERM, grant type (and the per-type read commands) to the ACL user","Fix credentials if NOAUTH appears","If keys are binary, ensure the client operates in binary-safe buffer mode"],"exampleFix":"// before\nclient.type(key).then((type) => { /* ... */ }).catch((e) => {\n  this.$message.error(`Type Error: ${e.message}`);\n});\n\n// after\nclient.type(key).then((type) => {\n  if (type === 'none') { this.$message.error(`${key} ${this.$t('message.key_not_exists')}`); return; }\n  this.addTab(this.initKeyTabItem(client, key, type), newTab);\n}).catch((e) => {\n  const m = /NOPERM/i.test(e.message) ? 'no permission for TYPE' : e.message;\n  this.$message.error(`Type Error: ${m}`);\n});","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":".catch((e) => {\n  const m = String(e.message);\n  if (/NOAUTH/.test(m)) { /* fix credentials, reconnect */ }\n  else if (/NOPERM/.test(m)) { /* grant +type to the ACL user */ }\n  else if (/ECONNRESET|closed/i.test(m)) { /* reconnect and retry once */ }\n  else { this.$message.error(`Type Error: ${m}`); }\n})","preventionTips":["Grant GUI users the read command set (+type plus per-type reads) in ACL","Reconnect before retrying after network transitions","Handle 'none' (missing) separately from rejections (failed)","Use buffer-safe key handling for binary key names"],"tags":["redis","type","acl","noauth","connection-drop"],"backgroundTag":"redis-command-failed","analyzedSha":"c149855106628babcdfb7675a8e7ba9434d2492a","analyzedAt":"2026-08-22T09:06:28.613Z","schemaVersion":2},"datasetVersion":"2026-08-22T09:17:25.309Z"}