SemanticMediaWiki / SemanticMediaWiki/Mermaid
Better error handling
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 48
- Forks
- 26
- PR merge metrics
- No merged PRs in 30d
Description
Currently, if you make an error in the mermaid text, the error is only displayed in the devtools console, which isn't particularly user friendly.
With #69 & 8.10.2, it appears to have gotten worse, with no console message and only the following image being displayed:

which is even less helpful.
Can we get a better way of displaying errors?
The mermaid docs mention a parseError function, which seems designed for this purpose - https://mermaid-js.github.io/mermaid/#/usage?id=advanced-usage . I had a brief play, but couldn't get it to work with the existing initialize & init workflow in ext.mermaid.js (which appears to be deprecated anyway, according to the documentation?)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with ext.mermaid.js and the Mermaid advanced-usage documentation for parseError, then reproduce the malformed Mermaid text described in the issue using the existing initialize and init workflow. Done means errors are displayed in a more user-friendly way instead of only appearing in devtools or as an unhelpful image.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100