In case when an error occurs for REST when a request contains invalid query parameters in GET URL or invalid payload for POST, we get a cumulative error response in one go in a JSON array.
For example, in case of a GetTravelBoundary request:
http:
//<server>:<port>/<webApp-context>/services/databases/<usroutedatabase>.json?
q=travelBoundary&costs=5,a&costUnit=mindd
Response
{
"errors": [
{
"errorCode": 4179,
"userMessage": "Error parsing Point CoordSys"
}, {
"errorCode": 3010,
"userMessage": "Invalid costUnit: minddd"
}, {
"errorCode": 3023,
"userMessage": "Invalid getTravelBoundary cost, must be a positive number : a, v"
}
],
"value": "Error parsing Point CoordSys"
}
The same error processing applies for GetRoute and GetRouteCostMatrix operations. The value node in the response JSON is deprecated and will be removed in future releases. For error checking only the errors node should be utilized.