Bugfix: invalid starting workflow form handling#3760
Open
andrewbrazzatti wants to merge 1 commit intofeature/ng19-formsfrom
Open
Bugfix: invalid starting workflow form handling#3760andrewbrazzatti wants to merge 1 commit intofeature/ng19-formsfrom
andrewbrazzatti wants to merge 1 commit intofeature/ng19-formsfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## feature/ng19-forms #3760 +/- ##
======================================================
- Coverage 53.54% 53.54% -0.01%
======================================================
Files 396 396
Lines 29298 29303 +5
Branches 6723 6727 +4
======================================================
+ Hits 15689 15690 +1
- Misses 12758 12762 +4
Partials 851 851
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Summary
This pull request fixes an issue where fetching the starting workflow form could crash the application when the form was not configured correctly.
The
FormsServicehas been updated to improve error handling and logging around starting workflow form retrieval. The RxJS pipeline was also simplified to make the logic clearer and more reliable, ensuring that failures do not break the observable chain.Context / related work
Technical implementation details
Improved error handling and logging
Additional safeguards were added when fetching starting workflow forms:
This ensures:
RxJS pipeline refactor
The RxJS pipeline used to fetch the starting workflow form was simplified for clarity and correctness.
Changes include:
filterandlastwithtake(1)to retrieve the first matching result more reliably.taketapmapcatchErrorCode readability improvements
flatMapcallback fromrecordTypetorecordTypeRecordto avoid shadowing and improve readability.Testing
Impact