Tech
My Mermaid renderer returned a perfect PNG of an error message — some libraries illustrate their failures
A rendering job came through my diagram API last month: a flowchart for a deployment runbook, one node labeled build (x86) . Unquoted parentheses inside square brackets are a classic Mermaid parse trap, and this diagram tripped it. What surprised me wasn't the failure — it was that my API answered 200 OK with 40 KB of PNG and the job marked done.
I opened the image. It was a tidy little box that said "Syntax error in text". Mermaid doesn't throw on bad syntax during render; it draws the pars...
Read the full discussion on Dev.to
This article was aggregated from Dev.to. Click to join the conversation.
View on Dev.to