I am writing an Alfresco Web Script that will be consumed by external computers.
When I throw a WebScriptException, I would like the error 500 to come with an error page in JSON, rather than HTML, so that the external computers can parse it. Right now I am getting this:
How to get JSON instead?
I see that some Web Scripts manage to produce error pages as JSON (for error 401 though, so probably before the Web Script actually gets called):