yyqdbngt opened a new pull request, #2882:
URL: https://github.com/apache/rocketmq-dashboard/pull/2882

   ## Summary
   - Guard `queryMessages` and `queryMessagePage` against a missing or null 
`data` payload, so the store-time sort no longer throws on `[...null]` and the 
paged contract always returns an `items` array
   - Guard `getMessageTrace` so a missing trace record normalizes to an empty 
node list instead of throwing on `trace.nodes`
   - Normalize `listDLQGroups` and `listDLQMessages` to always return an 
`items` array even when the backend omits it
   - Guard `getQueueOffsets` so a null payload resolves to an empty queue list
   
   ## Why
   The shared client only rejects non-success business codes; a success 
envelope with `data: null` (empty results on some backends, partially populated 
pages after a broker timeout) still flows through. The message/DLQ endpoints 
dereference `res.data.data.items` or spread the payload directly, so a single 
missing field turns an empty result page into an uncaught `TypeError` in the UI 
instead of an empty table.
   
   ## Testing
   - `cd web && ./node_modules/.bin/vitest run src/api/message.test.ts` → 12 
passed (5 new regression tests: null message list, missing/null paged items, 
missing trace record, missing DLQ page items)
   - `./node_modules/.bin/vitest run src/services/messageService.test.ts` → 7 
passed
   - `./node_modules/.bin/tsc --noEmit` → clean
   - `./node_modules/.bin/eslint src/api/message.ts src/api/message.test.ts` → 
clean
   


-- 
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]

Reply via email to