Closed chtenb closed 2 years ago
I assume that you are not using the kroki-fetch-diagram
option to download the images from Kroki at build time?
In this case, the Asciidoctor Kroki extension will generate <img>
elements that will be rendered client-side by the browser (i.e., preview pane). For instance:
<img src="https://kroki.io/graphviz/svg/abc">
When the request is unsuccessful or when an image cannot be display, the browser will show this broken image icon.
For reference, PlantUML generates images with the actual error message (as an image) but other diagram libraries don't.
When using kroki-fetch-diagram
option we could display a literal block with the error message returned by the API instead of the image because the extension does fetch the image.
Anyway, this issue is not really related to VS code. Could you please move this issue to https://github.com/mogztter/asciidoctor-kroki ?
Closing as no response and not particularly relevant to this extension.
This pull request https://github.com/yuzutech/kroki/pull/956 should improve the situation:
Having said that, I agree with @danyill, this issue is not tied to this extension.
When a diagram fails to render (e.g. due to a syntax error) the user gets no feedback about what went wrong:![image](https://user-images.githubusercontent.com/1030961/126368910-d242b2cc-6170-4110-bf77-eaa8ae0c1489.png)
It can be quite time consuming to constantly run the code in the online kroki tool to get a hold of the error message. It would be better to display a box with the error message in it as opposed to what is shown above.