-
Notifications
You must be signed in to change notification settings - Fork 3.3k
feat(better-error-handling): Added a method to check al the required sub-blocks of the workflow blocks. #373
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(better-error-handling): Added a method to check al the required sub-blocks of the workflow blocks. #373
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
@mo-amir-code is attempting to deploy a commit to the Sim Studio Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
This PR adds validation for required sub-block values in workflow blocks, improving error handling by providing specific error messages for missing required fields before execution begins.
- Added
handleCheckRequiredFieldsOfAllBlocksmethod in/apps/sim/app/w/[id]/hooks/use-workflow-execution.tsto validate required inputs - Method checks blocks sequentially and shows error notification for first missing required field
- Integrated validation into workflow execution flow through
handleRunWorkflow - Provides user-friendly error messages like "API key is required for block X" instead of generic errors
- Addresses issue #340 by improving error visibility and debugging experience
💡 (1/5) You can manually trigger the bot by mentioning @greptileai in a comment!
1 file(s) reviewed, 2 comment(s)
Edit PR Review Bot Settings | Greptile
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
|
@mo-amir-code the use workflow execution doesn't only run in the UI, but on the API, webhook, and chat message. How can we return a value so that an error is displayed for those? |
|
@emir-karabeg I was thinking only in UI, I will start working on it |
1b3f825 to
b9b662b
Compare
|
@mo-amir-code any updates? :D |
|
@emir-karabeg Please feel free to reassign or let someone else take over the task if needed. I really appreciate the opportunity to contribute and hope to be more active once my exams are over. Thanks for your understanding. |
|
@mo-amir-code no problem! Best of luck with your exams and looking forward to hearing from you soon! Let us know if we can help in any way :D @waleedlatif1 and I studied CS at Berkeley |
5fec813 to
b42c43a
Compare
|
resolved by #843 |
Description
Added a method to validate all the required sub-block values of each block of current workflow.
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context:
I added a method to check all the required sub-blocks values of workflow blocks. If any required field is missing then it is showing error alert/notification message only for first detected unfilled required sub-block value. For example: user created a workflow with 4 blocks and missed 2 required sub-block values in two different block then that method will show alert message for first unfilled sub-block value because it is checking flow wise and if user filled that required sub-block value and then the method will give an error message again to another unfilled sub-block value.
Fixes #340
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration.
Checklist:
bun run test)Security Considerations:
Additional Information:
Any additional information, configuration or data that might be necessary to reproduce the issue or use the feature.