Repository navigation
fix(AssetSelect): report listing errors on the widget - #1084
Merged
Merged
Conversation
The get_items error handler called a missing self.alert, so a failed listing raised AttributeError and the user saw nothing. Show the error in error_messages instead, and log a warning when a default asset lookup fails instead of dropping it silently.
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.
When the asset list cannot be loaded, the error handler of
AssetSelectcalledself.alert, which does not exist. Thus a failed listing raised anAttributeError, and the user saw no message.Now the widget shows the error in
error_messages. A reload that succeeds removes this error, but keeps the validation errors. When the lookup of a default asset fails, the widget now also logs a warning that it dropped the asset. Before, the log showed only the failed request.New unit tests cover these three cases. The
AssetSelecttests pass, also with live Earth Engine.