Hey folks, we are leveraging the @nteract/jupyter-widgets to support ipywidgets in our notebooks experience. I noticed that while rendering some notebooks that contain widget reference(s), we start seeing errors like the following on the console:

Cause
On a deeper investigation, the error is coming from this line in the WidgetDisplay component:
const model = await modelById(model_id);
I believe the component tries to fetch the model state from the kernel and if the state is not found there is a promise rejection that is uncaught in WidgetDisplay. This seems to be printing out this uncaught exceptions on to the console.
Proposal
I think the line I highlighted above with modelById should be surrounded by a try-catch block.
However, I wanted to understand what is the guidance on routing errors when caught? From this discussion thread, it seems like we might be able to dispatch an action so that hosts like us can then intercept these actions in our own epics if we need to log those errors upstream. However, I couldn't locate which action should we be relying on. Would you be able to provide some guidance here?
Thanks!
Hey folks, we are leveraging the
@nteract/jupyter-widgetsto support ipywidgets in our notebooks experience. I noticed that while rendering some notebooks that contain widget reference(s), we start seeing errors like the following on the console:Cause
On a deeper investigation, the error is coming from this line in the
WidgetDisplaycomponent:I believe the component tries to fetch the model state from the kernel and if the state is not found there is a promise rejection that is uncaught in
WidgetDisplay. This seems to be printing out this uncaught exceptions on to the console.Proposal
I think the line I highlighted above with
modelByIdshould be surrounded by atry-catchblock.However, I wanted to understand what is the guidance on routing errors when caught? From this discussion thread, it seems like we might be able to dispatch an action so that hosts like us can then intercept these actions in our own epics if we need to log those errors upstream. However, I couldn't locate which
actionshould we be relying on. Would you be able to provide some guidance here?Thanks!