Picoweb should return correct status for bad UML

0 votes
asked Oct 20, 2020 in Wanted features by 27escape (260 points)
picoweb is a great new feature, speeds up image generation, from 3.5s to 0.1s when starting planuml from scratch - many thanks.

I only have one issue, an image is returned when the supplied uml generated errors, the image contains the error message. Is it possible to either, return a HTTP status code and the error text or at the very least a header value that signifies failure, so I do not save a bad image

Cheers

Kevin

1 Answer

0 votes
answered Oct 20, 2020 by plantuml (295,000 points)
Thanks for the feedback: it's good to know that it's useful :-)

We handle HTTP answer better in very last beta http://beta.plantuml.net/plantuml.jar

Tell us if it helps!

Thanks
commented Oct 21, 2020 by 27escape (260 points)
edited Oct 21, 2020 by 27escape

With the beta version:

  • When the UML is bad I get a 400 status and message of ERROR, which is great!
  • When the UML is good, I get a 0 status, and message of ERROR

With the original version:

  •     status is always 200, message is always OK

Many thanks, as ever, for the speedy work.

commented Oct 21, 2020 by plantuml (295,000 points)

Many thanks, as ever, for the speedy work.

Too speedy this time :-)

So we've just fixed the HTTP status issue in last beta http://beta.plantuml.net/plantuml.jar

Note that there are some non-standard HTTP headers in the answer (X-PlantUML-Diagram-Width/X-PlantUML-Diagram-Height/X-PlantUML-Diagram-Description and X-PlantUML-Diagram-Error/X-PlantUML-Diagram-Error-Line for error) which may be useful.

Thanks for your tests!

commented Oct 26, 2020 by 27escape (260 points)
This is all good and I can confirm that it works!

Many thanks
...