123123213weqw commented on PR #5756: URL: https://github.com/apache/rocketmq-dashboard/pull/5756#issuecomment-6123348559
@lizhimins Both asks are in ([9ceeee99](https://github.com/apache/rocketmq-dashboard/commit/9ceeee99)): 1. A `catch (BusinessException)` branch now sits ahead of the generic `catch (RuntimeException)` and maps through `ToolExecutionException.from` — a tool-level refusal keeps its own HTTP status and message instead of being flattened into a 500-shaped `TOOL_EXECUTION_FAILED`, matching what the HTTP paths get from the global handler. 2. The generic branch reports `exception.getMessage()` rather than `toString()`, so the exception class name stays out of agent-visible text. 3. `McpToolRegistrarTest.aToolLevelRefusalKeepsItsOwnMessageOutOfTheGenericFailurePathTest` pins the mapping (message preserved verbatim, standard `EXECUTION_FAILED` code/hint). `McpToolRegistrarTest` is 6/6 on this branch merged onto the current `rocketmq-studio` (no conflicts). The PR description was also rewritten — the literal `\n` sequences are gone, and "The fix" now lists the `BusinessException` branch. -- 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]
