yyqdbngt opened a new pull request, #2938: URL: https://github.com/apache/rocketmq-dashboard/pull/2938
## Summary - `topicService.listAllTopics`, `consumerService.listAllConsumerGroups`, `settings.listAllDataSources`, and `studioUsers.listAllStudioUsers` now treat a success envelope whose `data` is `null` or lacks `items` as an empty page instead of crashing - `total` is only trusted when it is a finite number - Adds regression tests for every export walk (null payload, item-less payload, and the multi-page happy path) ## Why All four export flows walk the list in pages with `page <= MAX` and spread `result.items` into an accumulator. The client interceptor validates the business `code`, but a `code: 0` envelope can still carry `data: null` or a page object without `items` — in that case `items` is `undefined`, `push(...undefined)` throws a `TypeError`, and the entire export (topics/groups CSV, data-source export, studio-user export) dies on a single malformed page. ## Testing - `./node_modules/.bin/vitest run src/services/topicService.export.test.ts src/services/consumerService.test.ts src/api/settings.test.ts src/api/studioUsers.test.ts src/services/topicService.test.ts` → 37 passed (8 new; the 6 tolerance tests fail with the pre-fix code, the 2 happy-path tests pass both before and after) - `./node_modules/.bin/tsc --noEmit` → clean - `./node_modules/.bin/eslint` on the 8 changed files → 0 errors -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
