aminghadersohi commented on PR #44152:
URL: https://github.com/apache/superset/pull/44152#issuecomment-5771948494

   Follow-up on the “Uncaught pydantic ValidationError” suggestion in [review 
run 
e5f050](https://github.com/apache/superset/pull/44152#pullrequestreview-5179227336):
 the suggested extra exception type is unnecessary. Pydantic v2's 
`ValidationError` subclasses `ValueError`, so the existing `except ValueError` 
around `resolve_treemap_update_config` already returns the structured 
validation error.
   
   Commit b9d213c4d4ce9e6b5d03c6ea3e706caf7a41d799 already added 
`test_resolution_validation_error_is_caught_value_error`, which triggers a real 
invalid Treemap configuration and asserts that the resulting Pydantic exception 
is a `ValueError`. I reran it as part of the focused chart tests after merging 
master: 382 passed, 2 skipped. The installed Pydantic 2.13.4 also confirms that 
inheritance. No additional exception handler is needed.
   


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

Reply via email to