{"record":{"id":"4e7b018d5f42340c","repo":"qishibo/AnotherRedisDesktopManager","slug":"command-error-check-config","errorCode":null,"errorMessage":"Command Error, Check Config!","messagePattern":"Command Error, Check Config!","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/components/viewers/ViewerCustom.vue","lineNumber":85,"sourceCode":"        // \"{VALUE}\": this.content,\n        '{FIELD}': dataMap.key,\n        '{SCORE}': dataMap.score,\n        '{MEMBER}': dataMap.member,\n      };\n\n      const re = new RegExp(Object.keys(mapObj).join('|'), 'gi');\n      return params.replace(re, matched => mapObj[matched]);\n    },\n    execCommand() {\n      if (!this.content || !this.content.length) {\n        return this.execResult = '';\n      }\n\n      const command = this.getCommand();\n      const hexStr = this.content.toString('hex');\n\n      if (!command) {\n        return this.execResult = 'Command Error, Check Config!';\n      }\n\n      this.fullCommand = command.replace(\n        '{VALUE}',\n        this.content,\n      );\n\n      // in case of long content in template\n      this.previewCommand = command.replace(\n        '{VALUE}',\n        this.$util.cutString(this.content.toString(), this.previewContentMax),\n      );\n\n      // if content is too long, write to file simultaneously\n      // hex str is about 2 times of real size\n      if (hexStr.length > this.writeHexFileSize) {\n        ipcRenderer.invoke('getTempPath').then((reply) => {\n          // target file name","sourceCodeStart":67,"sourceCodeEnd":103,"githubUrl":"https://github.com/qishibo/AnotherRedisDesktopManager/blob/c149855106628babcdfb7675a8e7ba9434d2492a/src/components/viewers/ViewerCustom.vue#L67-L103","documentation":"Not a thrown error but the execResult string 'Command Error, Check Config!' set when getCommand() returns falsy in the custom binary viewer. ViewerCustom renders value through a user-configured external command (custom decode config, per-key pattern with {VALUE}/{HEX}/{HEX_FILE} placeholders); getCommand() resolves the command for the current key, and an empty/missing configuration yields this inline message instead of running anything.","triggerScenarios":"A key matches a custom-viewer rule whose command field is blank or whose configured viewer was deleted; the custom command config entry exists but its command string trims to empty; the key's viewer type resolves to Custom with no command template attached.","commonSituations":"Setting up custom decoders (e.g. 'protoc --decode_raw', 'openssl enc -d ...') and forgetting to fill the command input; editing config.json by hand and leaving an empty command; rules defined globally but overridden per-connection with an empty command.","solutions":["Open the custom viewer configuration and fill in a complete command containing {VALUE} (and optionally {HEX}/{HEX_FILE}) for the matching rule","Verify the rule's match pattern actually targets the key you are viewing","Check for per-connection custom config overriding a working global one","Test the command in a terminal first to confirm it decodes your value"],"exampleFix":"// before\nif (!command) {\n  return this.execResult = 'Command Error, Check Config!';\n}\n\n// after - point the user at the config\nif (!command) {\n  return this.execResult = 'No command configured for this key. Open Settings > Custom Viewers and set one.';\n}","handlingStrategy":"validation","validationCode":"const command = this.getCommand();\nif (!command || !command.includes('{VALUE}')) {\n  this.execResult = 'Command Error, Check Config!';\n  return;\n}","typeGuard":"const isConfiguredCommand = (cmd) => typeof cmd === 'string' && cmd.trim().length > 0 && /\\{VALUE\\}|\\{HEX(_FILE)?\\}/.test(cmd);","tryCatchPattern":null,"preventionTips":["Always include {VALUE} (or {HEX}/{HEX_FILE}) in custom viewer commands","Test commands in a terminal before saving the config","Check both global and per-connection custom viewer configs for empty entries"],"tags":["custom-viewer","configuration","vue","external-command"],"backgroundTag":"missing-command-configuration","analyzedSha":"c149855106628babcdfb7675a8e7ba9434d2492a","analyzedAt":"2026-08-22T09:06:28.613Z","schemaVersion":2},"datasetVersion":"2026-08-22T09:17:25.309Z"}