Error reference / flowchart, graph

Parse error: got 'CALLBACKNAME'

A node ID exactly matches a Mermaid keyword (call, click, or href) and is referenced without a shape, so the parser reads it as a click-callback token instead of a node name.

Parse error on line 3:
...   ok -->|yes| call
----------------------^
Expecting 'AMP', 'COLON', 'DOWN', 'DEFAULT', 'NUM', 'COMMA', 'NODE_STRING', 'BRKT', 'MINUS', 'MULT', 'UNICODE_TEXT', got 'CALLBACKNAME'

Why this happens

Mermaid's flowchart grammar reserves call, click, and href as syntax tokens for the click-interaction directive (click nodeId callback "tooltip"). When one of those words is used as a bare node ID -- most often as an arrow target that was never given a shape -- the parser reads it as the start of a click directive instead of a node reference and fails.

The same class of failure happens with end, subgraph, class, classDef, style, linkStyle, and interpolate, except those fail even when the node has a shape attached (call[Label] survives; end[Label] does not).

How to fix it

Rename the node to anything that isn't a reserved word -- callNode, callStep, apiCall all work -- and update every reference to it, not just the one that failed. If the ID only appears once with no shape, giving it one (call[Label]) is enough for call, click, and href specifically.

MermaidPen's studio detects this automatically and can rename every occurrence consistently with one click.

Broken

Fails to parse

Rendering preview...
flowchart TD
    call[Call external API] --> ok{2xx response?}
    ok -->|yes| call
    ok -->|no| retry[Retry]

Fixed

Renders correctly

Rendering preview...
flowchart TD
    callNode[Call external API] --> ok{2xx response?}
    ok -->|yes| callNode
    ok -->|no| retry[Retry]
Open fixed version in studio

More errors