Response for Multiple Error in a Single Request - Spectrum_Routing_for_Big_Data - 3.0

Global Routing SDK Developer Guide

Product type
Software
Portfolio
Locate
Product family
Spectrumâ„¢ software
Product
Spatial Big Data > Routing for Big Data
Version
3.0
ft:locale
en-US
Product name
Routing for Big Data
ft:title
Global Routing SDK Developer Guide
Copyright
2024
First publish date
2007
ft:lastEdition
2024-10-15
ft:lastPublication
2024-10-15T10:39:39.482000

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.