-
Notifications
You must be signed in to change notification settings - Fork 64
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
Detect assembly loading error and encapsulate error instead of failing at app level #2236
Merged
Conversation
This file contains 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
5a457f2
to
569c645
Compare
Target branch is #2188 but probably doesn't necessarily have to be |
569c645
to
83a613d
Compare
Codecov Report
@@ Coverage Diff @@
## main #2236 +/- ##
==========================================
+ Coverage 62.98% 63.01% +0.03%
==========================================
Files 485 488 +3
Lines 22716 22760 +44
Branches 5159 5170 +11
==========================================
+ Hits 14308 14343 +35
- Misses 8138 8147 +9
Partials 270 270
Continue to review full report at Codecov.
|
83e437e
to
c6b50d6
Compare
b8b9241
to
45f63e2
Compare
c6b50d6
to
7bf1a16
Compare
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.
This PR allows detecting that an assembly failed to load for either the case of
(a) a defaultSession loads a view who has a displayedRegion assembly that fails e.g. 404
(b) browsing the import form and selecting an assembly gives an error e.g. 404
See #2235
The volvox demo data has a "volvox404" assembly added that is always a 404. To test, you can also generate other errors by turning off network in chrome or inserting a throw into the sequence adapter's getRegions function or similar.
This results in a couple places where we have to be careful to clear the error state. There is the view model's error state, and there is the import form components error state. The import form components error state is initialized with the model's error state, and import form onSubmit clears the model's error state
This is also for the LGV only, and if we want to put it into other parts of the app, we may need to perform more effort, or create some better abstractions.
screenshot showing the 404 from volvox