{"record":{"id":"b42f9c85b11641a6","repo":"qishibo/AnotherRedisDesktopManager","slug":"error-err-exec-without-multi","errorCode":null,"errorMessage":"(error) ERR EXEC without MULTI","messagePattern":"\\(error\\) ERR EXEC without MULTI","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/components/CliTab.vue","lineNumber":232,"sourceCode":"        this.multiQueue = [];\n        return this.scrollToBottom('OK');\n      }\n\n      // multi-discard-mode\n      if (paramsArr[0] == 'discard') {\n      // discard when not multi condition\n        if (!Array.isArray(this.multiQueue)) {\n          return this.scrollToBottom('(error) ERR DISCARD without MULTI');\n        }\n        this.multiQueue = null;\n        return this.scrollToBottom('OK');\n      }\n\n      // multi dequeue\n      if (paramsArr[0] == 'exec') {\n        // exec when not multi condition\n        if (!Array.isArray(this.multiQueue)) {\n          return this.scrollToBottom('(error) ERR EXEC without MULTI');\n        }\n\n        this.anoClient.multi(this.multiQueue).execBuffer((err, reply) => {\n          if (err) {\n            this.content.push(`${err}`);\n          } else {\n            this.content.push(this.resolveResult(reply).trim());\n          }\n\n          this.scrollToBottom();\n        });\n\n        return this.multiQueue = null;\n      }\n\n      // multi enqueue\n      if (Array.isArray(this.multiQueue)) {\n        this.multiQueue.push(['callBuffer', paramsArr[0], ...paramsArr.slice(1)]);","sourceCodeStart":214,"sourceCodeEnd":250,"githubUrl":"https://github.com/qishibo/AnotherRedisDesktopManager/blob/c149855106628babcdfb7675a8e7ba9434d2492a/src/components/CliTab.vue#L214-L250","documentation":"Same client-side transaction guard as DISCARD: EXEC is only valid while multiQueue is an Array (set by MULTI). When it is null, the CLI locally echoes '(error) ERR EXEC without MULTI' instead of sending anoClient.multi(multiQueue).execBuffer(). No network round-trip occurs.","triggerScenarios":"Typing EXEC in the workbench CLI before any MULTI; after a prior EXEC consumed the queue; or after a failed command's .catch reset multiQueue to null mid-transaction.","commonSituations":"Replaying pasted transaction scripts, switching tabs mid-MULTI and losing track of state, queue aborted by an errored queued command.","solutions":["Begin with MULTI, queue commands, then EXEC","Review prior output to see whether an earlier EXEC/DISCARD or error already ended the transaction","Re-issue the full MULTI ... EXEC sequence"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// validate local transaction state before EXEC\nfunction canExec(multiQueue) {\n  return Array.isArray(multiQueue) && multiQueue.length >= 0;\n}\n\nif (paramsArr[0] === 'exec' && !canExec(this.multiQueue)) {\n  return this.scrollToBottom('no MULTI in progress - type MULTI first');\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always open with MULTI; EXEC/DISCARD are only valid inside it","A failed command in this CLI aborts the queue - restart the transaction after any error","Keep pasted scripts self-contained MULTI..EXEC so replay is idempotent"],"tags":["redis","cli","multi-exec","transactions","ardm"],"backgroundTag":"redis-transaction-error","analyzedSha":"c149855106628babcdfb7675a8e7ba9434d2492a","analyzedAt":"2026-08-22T09:06:28.613Z","schemaVersion":2},"datasetVersion":"2026-08-22T09:17:25.309Z"}