daniel-s
5/30/2017 - 4:14 PM

Google JSON API guide

Google JSON API guide

Google JSON guide

StackOverflow answer

Success response return data

{
  "data": {
    "id": 1001,
    "name": "Wing"
  }
}

Error response return error

{
  "error": {
    "code": 404,
    "message": "ID not found"
  }
}

and if your client is JS, you can using if ("error" in response) {} to check if there is error.