Errors

Our REST API provides errors in a specific format, allowing you to catch it and show a specifique message, or just let the default message showing.

Response format

{
    "detail": "Aucun(e) station n'a été trouvé(e) pour ('dzqd qdzq',).",
    "message": "station.object_not_found | Aucun(e) station n'a été trouvé(e) pour ('dzqd qdzq',).",
    "object_class_or_name": "Station",
    "object_id": [
        "stn_13b35c433fa4322"
    ],
    "status": 404,
    "title": "station.object_not_found",
    "type": "about:blank"
}
  • status number : The HTTP status code <https://en.wikipedia.org/wiki/List_of_HTTP_status_codes> of the error

  • detail string : A sentence (in French) describing the error

  • title string : a unique snake case string for each error. It can be use as a key in a translation service.

  • object_id string : the id you provided in the request parameters