carlos-jenkins / plantweb

Plantweb is a Python client for the PlantUML server -
https://plantweb.readthedocs.io/
Apache License 2.0
27 stars 15 forks source link

Fail on Syntax Error in HTTP header #13

Open jessetan opened 6 years ago

jessetan commented 6 years ago

Plantweb server always returns 200 OK, even if the input contains a syntax error. Instead it uses HTTP headers to signal the error. This PR adds a check for this header, fixes #12

carlos-jenkins commented 6 years ago

Thank you very much @jessetan fpr the fix.

I've been working on it too:

https://github.com/carlos-jenkins/plantweb/commit/c18aa43c71c729fdb0f40f6c1a7edb58810ff5c3

I like several things from your PR, I'll merge both branches and merge it. I'm a little worried about two things:

1 - Need to check the behavior of the Sphinx directives when they fail, maybe a typed try / except needs to be added to either crash the documentation build or include an error node on the document. 2 - When using the CLI tool, should be just let it crash or pretty print a nice error on the terminal, again with a typed try / except.

Regards and thanks again.