fathyb / html2svg

Convert HTML and `<canvas>` to SVG, PDF, or images using Chromium
1.19k stars 30 forks source link

Please provide command-line feedback if the server returns an error status code #34

Open paulmillar opened 1 year ago

paulmillar commented 1 year ago

When making a request, sometimes the server responds with a 4xx or 5xx status code, indicating some kind of problem. For example, a server might return a 404 status code if the URL is mistyped.

Currently, html2svg renders such error message pages and provides no feedback to the user that the server returned an error status code.

While this behaviour is consistent, I think (in most cases) people are not interested in capturing the rendered error message page. A more helpful behaviour would be for html2svg to return an error message on stderr and refrain from generating the output.