Skip to content
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

Handling error during selecting a kernel #7094

Merged
merged 3 commits into from Aug 27, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 5 additions & 1 deletion packages/apputils/src/clientsession.tsx
Expand Up @@ -623,7 +623,11 @@ export class ClientSession implements IClientSession {
});
}
if (model) {
return this._changeKernel(model).then(() => undefined);
return this._changeKernel(model).then(() => undefined)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_changeKernel devolves down to two cases:

return session.changeKernel(options);

In the above case, no error message is shown, and presumably is the case you are hitting, and

return this._startSession(options);

In the above case, the error message is shown if there is a problem.

If we trap errors from _changeKernel, we end up showing the error twice if we hit the second case above. How about we change _changeKernel to also show an error in the first case above instead?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jasongrout Nice catch. I have made the required changes. Do let me know your comments.

.catch( err => {
this._handleSessionError(err);
return Promise.reject(err);
});
}
})
.then(() => {
Expand Down