-
Notifications
You must be signed in to change notification settings - Fork 153
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
Suppress 404 error for notebook route when the notebook is not running #989
Suppress 404 error for notebook route when the notebook is not running #989
Conversation
I created a way to force a 404 error. In the old implementation, 404 would persist even while loading. In the new implementation there is no error until loaded. I had concerns about setting error to null everytime being unnessary if (!isRunning && e.statusObject?.code === 404) {
setLoadError(null);
} But in the case where there was an error while running, and the user stops and starts again, the error wont go away until a successful call is made. So no issue there. unless it would be desired to keep the error after it has been shut down (doubt it is so lgtm). /lgtm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should help with the optics of what is going on during the load. Either way, when the route eventually comes back it should reset to being active (previous functionality). Good improvement for the meantime.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: andrewballantyne, Gkrumbach07, lucferbux The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Description
Closes #858
How Has This Been Tested?
There is no good way to test it because once you delete the route, it will recreate one immediately before re-fetching it. I tested it by changing the
notebookName
to something else, which will give you a 404 error when you are trying to get the route, but theisRunning
status is always accurate. In this way, I can toggle the switch and see if the error is set or not when based on the notebook status.Merge criteria: