GIScience/openpoiservice

Error response format differs from the convention used by other ORS backends

aoles opened this issue · 0 comments

aoles commented

The format of errors returned by the pois API differs from the one used by the rest of ORS endpoints. It is an object with code and message at top level

{
    "code": 4000,
    "message": "Invalid JSON object in request"
}

rather than a JSON object with code and message nested in error such as for directions, for example:

{
  "error": {
    "code": 2001,
    "message": "Parameter 'profile' is missing."
  },
  "info": {
    "engine": {
      "version": "4.5.0",
      "build_date": "2018-03-26T13:41:46Z"
    },
    "timestamp": 1528809944677
  }
}