In some error cases, a non-JSON result page was returned by the REST
API. This led to problems with script execution as the page was not
valid JSON and thus the parsers threw errors.
The errors which led to the non-JSON result will now be returned as
a JSON result and a log entry will be made.
To the list of all Werks