Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
);
}
if (kernel.type !== "websocket" || !kernel.id) {
return of(
actions.restartKernelFailed({
error: new Error("Can only restart Websocket kernels via API."),
kernelRef,
contentRef
})
);
}
const id = kernel.id;
return kernels.restart(serverConfig, id).pipe(
mergeMap((response: AjaxResponse) => {
if (response.status !== 200) {
return of(
actions.restartKernelFailed({
error: new Error("Unsuccessful kernel restart."),
kernelRef,
contentRef
})
);
} else {
if (outputHandling === "Run All") {
return of(
actions.restartKernelSuccessful({
kernelRef,
contentRef
}),