codeant-ai-for-open-source[bot] commented on PR #38731:
URL: https://github.com/apache/superset/pull/38731#issuecomment-4085635497
## **Sequence Diagram**
This PR changes flattened MCP wrappers to convert Pydantic validation
failures into ToolError instead of leaking raw ValidationError. The new flow
returns a consistent, serializable error message that includes invalid fields
and required fields.
```mermaid
sequenceDiagram
participant Client
participant FlattenedWrapper
participant RequestModel
participant ToolFunction
Client->>FlattenedWrapper: Call tool with flattened parameters
FlattenedWrapper->>RequestModel: Validate parameters
alt Validation passes
RequestModel-->>FlattenedWrapper: Parsed request model
FlattenedWrapper->>ToolFunction: Execute tool with model and context
ToolFunction-->>Client: Return tool result
else Validation fails
RequestModel-->>FlattenedWrapper: Validation error details
FlattenedWrapper-->>Client: Raise ToolError with invalid and
required fields
end
```
---
*Generated by [CodeAnt AI](https://codeant.ai)*
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]