buildErrorReport (cells/error-report.ts)

marimo · frontend/src/core/cells/error-report.ts · typescript · Apache-2.0
ui, tag:knn-classified

Builds a structured error report for notebook cells, including message and traceback.

// Source: https://github.com/marimo-team/marimo | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
/* Copyright 2026 Marimo. All rights reserved. */

import { describeError } from "@/core/errors/error-entries";
import type { MarimoError } from "@/core/kernel/messages";
import { sanitizeHtml } from "@/plugins/core/sanitize-html";
import { parseHtmlContent } from "@/utils/dom";
import type { CellId } from "./ids";

export interface CellOutputMessage<Output> {
  type: "cell-output";
  cell_id: CellId;
  code?: string;
  output: Output;
}

export interface ErrorMessageOutput {
  type: "error";
  instructions: string;
  message: string;
  traceback?: string;
}

export const ERROR_MESSAGE

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key