Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Break statement fails with mermaid #1366

Closed
Jahmilli opened this issue Nov 7, 2022 · 4 comments
Closed

Break statement fails with mermaid #1366

Jahmilli opened this issue Nov 7, 2022 · 4 comments

Comments

@Jahmilli
Copy link

Jahmilli commented Nov 7, 2022

Hey, i've noticed that when using the 'break' statement with mermaid for sequence diagrams, it results in a 400 OK and does not render the diagram. Please see the image below of an example test on https://kroki.io/
image

Note that the same UML works on https://mermaid.live/
image

The example is

sequenceDiagram
    Consumer-->API: Book something
    API-->BookingService: Start booking process
    break when the booking process fails
        API-->Consumer: show failure
    end
    API-->BillingService: Start billing process

Note that with kroki, i get the same error result when running Kroki locally with a docker container, where the container logs

{
  "timestamp": "1667794155439",
  "level": "ERROR",
  "thread": "vert.x-eventloop-thread-1",
  "mdc": {
    "error_message": "Syntax error in graph",
    "path": "mermaid:8002/mermaid/svg",
    "method": "POST",
    "action": "delegate",
    "error_code": "400"
  },
  "logger": "io.kroki.server.action.Delegator",
  "message": "Unsuccessful request POST mermaid:8002/mermaid/svg - response: {statusCode:400 body: Syntax error in graph}",
  "context": "default"
}

Please let me know if you need any additional information. Happy to help contribute if possible! :)

@ggrossetie
Copy link
Member

It might be because we are not using the latest version. Do you know if break is a new feature?

@Jahmilli
Copy link
Author

Jahmilli commented Nov 7, 2022

Hey, yeh I can see that it was added into their 9.1.2 release on June 15 as part of this PR mermaid-js/mermaid#3063

Given that the last release for this for this was June 2, then yeh a version update or whatever is required sounds necessary.

@ggrossetie
Copy link
Member

The current latest version of Kroki (0.17.1) is using Mermaid 9.1.1.
Main branch is already using Mermaid 9.2.0 and a new release of Kroki is coming now.

@Jahmilli
Copy link
Author

closing this as it's been fixed in the newest version, thanks for it! 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants