Skip to content

Commit

Permalink
snackbar message if auto-update fails
Browse files Browse the repository at this point in the history
  • Loading branch information
kecnry committed Apr 16, 2024
1 parent dbab3d3 commit 0060495
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion jdaviz/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,12 @@ def _update_live_plugin_results(self, trigger_data_lbl=None, trigger_subset=None
if not plg.supports_auto_update:
raise NotImplementedError(f"{data.meta.get('Plugin')} does not support live-updates") # noqa
plg.user_api.from_dict(plugin_inputs)
plg()
try:
plg()
except Exception as e:
self.hub.broadcast(SnackbarMessage(
f"Auto-update for {plugin_inputs['add_results']['label']} failed: {e}",
sender=self, color="error"))

def _on_add_data_message(self, msg):
self._on_layers_changed(msg)
Expand Down

0 comments on commit 0060495

Please sign in to comment.