Inconsistent error responses
As mentioned in the error responses description,
The entity-body in an error response will vary depending upon the software component that generates the response
so it is not possible to eliminate all inconsistencies. But maybe some can be eliminated or minimized. For example, jetty/exist-db/restxq (6.2) is currently producing
Content-Type: text/html;charset=iso-8859-1
Content-Length: 498
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
<title>Error 405 HTTP method GET is not supported by this URL</title>
</head>
<body><h2>HTTP ERROR 405 HTTP method GET is not supported by this URL</h2>
<table>
<tr><th>URI:</th><td>/exist/restxq/Spase/Style</td></tr>
<tr><th>STATUS:</th><td>405</td></tr>
<tr><th>MESSAGE:</th><td>HTTP method GET is not supported by this URL</td></tr>
<tr><th>SERVLET:</th><td>RestXqServlet</td></tr>
</table>
</body>
</html>
while hdpws produces error responses like
Content-Type: application/xhtml+xml; charset=UTF-8
Connection: close
Transfer-Encoding: chunked
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Bad Request</title>
</head>
<body>
<p class="ErrorMessage"><b>Message: </b>Bad Request</p>
<p class="ErrorDescription"><b>Description: </b>Invalid ResourceType value at position 1.</p>
</body>
</html>
This latter example is consistent with the current error description documentation and with the cdasws and sscws web services (and payara/glassfish error resposnes) but different the earlier example. Note that the later is xhtml and utf-8 which is easier to parse. But I haven't found documentation on how to change jetty/exist-db/restxq's error responses.