gabotorresruiz opened a new pull request, #35558: URL: https://github.com/apache/superset/pull/35558
<!--- Please write the PR title following the conventions at https://www.conventionalcommits.org/en/v1.0.0/ Example: fix(dashboard): load charts correctly --> ### SUMMARY <!--- Describe the change below, including rationale and design decisions --> Previously, when attempting to import a theme that already exists in the system, users would receive a validation error message instead of a user-friendly confirmation dialog. This was caused by the theme import API catching `ValidationError` exceptions too early and returning a simple error message. This PR fixes the issue by removing the premature exception handling and allowing `CommandInvalidError`. The global handler structures the response with the proper `extra` field format, which the frontend's `getAlreadyExists()` function parses to display the overwrite confirmation UI. ### BEFORE/AFTER SCREENSHOTS <!--- Skip this if not applicable --> #### Before <img width="770" height="384" alt="Screenshot 2025-10-07 at 19 09 01" src="https://github.com/user-attachments/assets/1de63a7e-31d6-4e75-a456-d036b2bc83ee" /> #### After <img width="772" height="395" alt="Screenshot 2025-10-07 at 19 07 42" src="https://github.com/user-attachments/assets/f2ca0467-4bf5-431f-a7fa-a9df45b09c97" /> ### TESTING INSTRUCTIONS <!--- Required! What steps can be taken to manually verify the changes? --> ### ADDITIONAL INFORMATION <!--- Check any relevant boxes with "x" --> <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue --> - [ ] Has associated issue: - [ ] Required feature flags: - [x] Changes UI - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351)) - [ ] Migration is atomic, supports rollback & is backwards-compatible - [ ] Confirm DB migration upgrade and downgrade tested - [ ] Runtime estimates and downtime expectations provided - [ ] Introduces new feature or API - [ ] Removes existing feature or API -- 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]
