{"record":{"id":"3dd789a65d945650","repo":"qishibo/AnotherRedisDesktopManager","slug":"e-message-3dd789","errorCode":null,"errorMessage":"e.message","messagePattern":"e\\.message","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/components/contents/KeyContentZset.vue","lineNumber":177,"sourceCode":"      this.scanStream = null;\n      this.oneTimeListLength = 0;\n      this.loadMoreDisable = false;\n    },\n    getListRange(resetTable) {\n      const start = this.pageSize * this.pageIndex;\n      const end = start + this.pageSize - 1;\n      const sortMethod = this.sortType === 'ASC' ? 'zrangeBuffer' : 'zrevrangeBuffer';\n\n      this.client[sortMethod]([this.redisKey, start, end, 'WITHSCORES']).then((reply) => {\n        const zsetData = this.solveList(reply);\n\n        this.zsetData = resetTable ? zsetData : this.zsetData.concat(zsetData);\n        (zsetData.length < this.pageSize) && (this.loadMoreDisable = true);\n        this.loadingIcon = '';\n      }).catch((e) => {\n        this.loadingIcon = '';\n        this.loadMoreDisable = true;\n        this.$message.error(e.message);\n      });\n    },\n    getListScan() {\n      if (!this.scanStream) {\n        this.initScanStream();\n      } else {\n        this.oneTimeListLength = 0;\n        this.scanStream.resume();\n      }\n    },\n    initScanStream() {\n      const scanOption = { match: this.getScanMatch(), count: this.pageSize };\n      scanOption.match != '*' && (scanOption.count = this.searchPageSize);\n\n      this.scanStream = this.client.zscanBufferStream(\n        this.redisKey,\n        scanOption,\n      );","sourceCodeStart":159,"sourceCodeEnd":195,"githubUrl":"https://github.com/qishibo/AnotherRedisDesktopManager/blob/c149855106628babcdfb7675a8e7ba9434d2492a/src/components/contents/KeyContentZset.vue#L159-L195","documentation":"Toast showing e.message when the sorted-set page fetch fails in KeyContentZset.vue:177. listScan() picks zrangeBuffer or zrevrangeBuffer based on sortType and issues [key, start, end, 'WITHSCORES']; any rejection stops loading, clears the spinner and disables pagination. Typical rejections: WRONGTYPE (key no longer a zset), dropped connection, READONLY from a replica, or OOM refusing reads during memory pressure.","triggerScenarios":"ZRANGE ... WITHSCORES rejected when: the key was deleted and recreated as another type between page loads; the connection closes mid-pagination ('Connection is closed'); a cluster failover redirects to a replica that answers READONLY; the end index math (start + pageSize - 1) runs against a key that shrank, though Redis clamps indexes rather than erroring, so type/connection causes dominate.","commonSituations":"Paging large leaderboards while a job rebuilds the zset (DEL + ZADD in a loop); VPN/TCP resets during long browsing sessions; browsing replicas that are read-only for commands the client issues during topology churn.","solutions":["Reload the key — WRONGTYPE means the member/score table no longer corresponds to a zset","Reconnect on connection-error messages and press load-more again; ZRANGE is stateless","Toggle sort order (ASC/DESC) after reconnect to force a fresh stream/scan reset","Verify the endpoint is a master or allow reads on replicas when operating clusters"],"exampleFix":"// before\n}).catch((e) => {\n  this.loadingIcon = '';\n  this.loadMoreDisable = true;\n  this.$message.error(e.message);\n});\n\n// after: keep 'load more' available for transient failures\n}).catch((e) => {\n  this.loadingIcon = '';\n  this.loadMoreDisable = /WRONGTYPE|READONLY/.test(e.message);\n  this.$message.error(e.message);\n});","handlingStrategy":"try-catch","validationCode":"if (this.client.status !== 'ready') {\n  this.$message.error(`connection not ready (${this.client.status})`);\n  return;\n}","typeGuard":null,"tryCatchPattern":".catch((e) => {\n  this.loadingIcon = '';\n  this.loadMoreDisable = /WRONGTYPE|READONLY/.test(e.message);\n  this.$message.error(`ZRANGE: ${e.message}`);\n})","preventionTips":["Reload the key when the type badge changes — WRONGTYPE kills ZRANGE","Reconnect and continue pagination; ZRANGE is stateless per page","In clusters, read from masters or enable reads on replicas"],"tags":["redis","zset","zrange","pagination","ardm"],"backgroundTag":"redis-reply-error","analyzedSha":"c149855106628babcdfb7675a8e7ba9434d2492a","analyzedAt":"2026-08-22T09:06:28.613Z","schemaVersion":2},"datasetVersion":"2026-08-22T09:17:25.309Z"}