yyqdbngt opened a new pull request, #2909: URL: https://github.com/apache/rocketmq-dashboard/pull/2909
## Summary `MessageTraceToolHandler` projects the trace timeline into the tool output, but assumed `MessageService.getMessageTrace` always returns a record with populated `nodes` / `consumerStatus` lists. Providers may report a missing trace as `null` (the service's own `recordTraceQuery` already guards for exactly that case) or as a record whose lists are absent, and the handler turned both shapes into an NPE 500 for AI/MCP/CLI callers. The projection now treats a missing trace or missing lists as an empty timeline. The tool output schema only requires the arrays to be present, so empty arrays stay schema-valid. ## Why The same trace lookup is also served to the web UI, where a missing trace renders as an empty timeline. MCP/CLI callers of `rmq.message.trace` should get the same "no trace found" answer instead of an internal error. ## Testing Extended `MessageTraceToolHandlerTest` with two regression cases: null trace record, and record with null node/consumer-status lists. ``` mvn -q -Dtest=MessageTraceToolHandlerTest test Tests run: 3, Failures: 0, Errors: 0, Skipped: 0 ``` -- 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]
