Skip to content

Commit

Permalink
feat: improve kernelexecutor error reject (datalayer#279)
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcos Alves committed Aug 2, 2024
1 parent 7e153dc commit 20e27c0
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions packages/react/src/jupyter/kernel/KernelExecutor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -258,13 +258,9 @@ export class KernelExecutor {
break;
case 'error':
{
// NOTE: This block that was here previously cannot extract the properties consistently,
//causing the Promise to never be rejected in case of an execution error.
// const { ename, evalue, traceback } = (
// content as any as KernelMessage.IErrorMsg
// ).content;
const { ename, evalue, traceback } = content as KernelMessage.IReplyErrorContent;
this._executed.reject(
`${content.ename}: ${content.evalue}\n${(content.traceback ?? []).join('\n')}`
`${ename}: ${evalue}\n${(traceback ?? []).join('\n')}`
);
}
break;
Expand Down

0 comments on commit 20e27c0

Please sign in to comment.