Skip to content

fix(jupyter): report cell errors instead of failing silently#35328

Merged
bartlomieju merged 1 commit into
mainfrom
fix/jupyter-cell-error-reporting
Jun 18, 2026
Merged

fix(jupyter): report cell errors instead of failing silently#35328
bartlomieju merged 1 commit into
mainfrom
fix/jupyter-cell-error-reporting

Conversation

@bartlomieju

Copy link
Copy Markdown
Member

deno jupyter stopped surfacing cell errors in 2.8.2: a cell that throws
just produced an empty status: "ok" reply with no stack trace, where
2.8.1 showed the error. The regression came in with the JS-kernel rewrite
in #34083.

The cause is a data-shape mismatch between the kernel JS and the Rust op
it calls. op_jupyter_repl_evaluate returns a cdp::EvaluateResponse
directly, which serializes to { result, exceptionDetails } at the top
level. The JS kernel, however, read it through a .value wrapper that the
Rust side never sends, so evalResult?.value?.exceptionDetails was always
undefined. The error branch never fired and the throwing cell silently
reported success with no error broadcast. The same wrong indirection
also broke the last-expression display value and the completion objectId
lookup.

This drops the bogus .value in the three affected reads so the kernel
reads exceptionDetails, result, and result.objectId off the response
where they actually live.

Adds a regression test that evaluates a throwing cell and asserts the
execute_reply comes back with status: "error" plus a populated
traceback, and that an error message is broadcast on iopub.

Fixes #35290

The JS kernel rewrite (#34083) read the evaluate op result under a
`.value` wrapper that the Rust side never sends. `op_jupyter_repl_evaluate`
returns a `cdp::EvaluateResponse` directly (`{ result, exceptionDetails }`),
so `evalResult?.value?.exceptionDetails` was always `undefined`: a throwing
cell silently became `status: "ok"` with no error broadcast, and the
last-expression value / completion objectId lookups were broken the same way.

Drop the bogus `.value` indirection in the three affected reads. Adds a
regression test asserting a throwing cell replies with `status: "error"`
and broadcasts an `error` message with a traceback.

Fixes #35290
@bartlomieju
bartlomieju merged commit 3568da2 into main Jun 18, 2026
266 of 270 checks passed
@bartlomieju
bartlomieju deleted the fix/jupyter-cell-error-reporting branch June 18, 2026 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deno Jupyter in VS Code not showing stack traces in 2.8.3

1 participant