mirror of
https://github.com/microsoft/vscode.git
synced 2026-08-15 02:07:31 +01:00
Show real Mermaid error instead of [object Object]
Mermaid rejects parse/render failures (e.g. from mermaid.run) with a plain
object of shape { str, message, hash, error } rather than an Error instance.
createMermaidErrorElement previously fell back to String(error) for non-Error
throwables, rendering the unhelpful [object Object] and hiding the real syntax
error. Extract the message (or Mermaid's str) from such objects before falling
back.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>