fix(frontend, v1.2): improve static error msgs to be user-friendly for unco… - #7012
Open
Yicong-Huang wants to merge 1 commit into
Conversation
apache#6288) ### What changes were proposed in this PR? This PR overhauls the static error validation and error messaging across Texera operators to drastically improve the experience for new users during workflow editing. Previously, if a user dragged an operator (like `Projection`, `MySQL`, or `CSV File Scan`) onto the canvas without configuring it yet, the system would immediately throw intimidating and cryptic Java exceptions (e.g., `IllegalArgumentException`, `SQLException: No suitable driver found`, or `/texera (Is a directory)`). Changes proposed: 1. **Frontend Global Catch-all**: Updated the regex logic in `error-frame.component.ts` to cleanly strip internal Java prefixes (like `java.lang.IllegalArgumentException:` or `requirement failed:`) so the user only sees the human-readable part of the error message. 2. **Projection Operator**: Updated `ProjectionOpDesc` to explicitly prompt the user to select an attribute. 3. **Database Sources**: Updated `SQLSourceOpDesc` (and `AsterixDBSourceOpDesc`) to intercept empty database configuration fields and return actionable UI instructions (e.g., "Please enter a valid host name for the database in the properties panel"). 4. **File Scan Sources**: Updated all file scan operators (`ParallelCSV`, `JSONL`, `Arrow`, etc.) to gracefully catch directory selections and missing files before attempting physical reads, replacing IOExceptions with clear prompts to select a valid file from the right-hand panel. ### Any related issues, documentation, discussions? Issue#2735 ### How was this PR tested? Tested manually by rebuilding the `workflow-compiling-service` and dragging every modified operator (Projection, MySQL, PostgreSQL, AsterixDB, CSV, JSONL, Arrow) onto a new workflow canvas. Verified that the Result Panel correctly displays the newly formatted, user-friendly instructions instead of raw Java exceptions. ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Antigravity (DeepMind) **Tests:** <img width="890" height="560" alt="WhatsApp Image 2026-07-09 at 12 56 49" src="https://github.com/user-attachments/assets/4dd8f144-49c4-439f-be9b-89fbbfc6f8dd" /> -------------------------------------------------------------------------------------------------------------------------------------- <img width="1143" height="811" alt="image" src="https://github.com/user-attachments/assets/463ec68b-636c-4ff9-ba65-f907f229c79d" /> -------------------------------------------------------------------------------------------------------------------------------------- <img width="1544" height="639" alt="image" src="https://github.com/user-attachments/assets/923bc582-d825-4b15-8b00-6fff1f651642" /> -------------------------------------------------------------------------------------------------------------------------------------- <img width="1397" height="709" alt="image" src="https://github.com/user-attachments/assets/731510a0-fba1-4a0f-86fd-12b2766e8e17" /> -------------------------------------------------------------------------------------------------------------------------------------- --------- (backported from commit 8a51c56) Co-authored-by: probe <probe@x>
Contributor
Automated Reviewer SuggestionsBased on the
|
❌ 2 Tests Failed:
View the top 2 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this PR?
Backport of #6288 to
release/v1.2, cherry-picked from 8a51c56.Source fix only. Test changes from #6288 were omitted (the touched specs do not exist on
release/v1.2or depend on main-only test infrastructure); only the source fix is carried over, per maintainer guidance.Any related issues, documentation, discussions?
Backport of #6288. Originally linked #2735.
How was this PR tested?
Release-branch CI runs on this PR. Source change cherry-picked cleanly; test changes intentionally dropped.
Was this PR authored or co-authored using generative AI tooling?
Yes — backport prepared with Claude Code (mechanical cherry-pick + conflict resolution; the change itself is #6288 by its original author).
🤖 Generated with Claude Code