NLnetLabs / roto-api

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

API returns incorrect json for prefixes with empty `meta` field.

density215 opened this issue · comments

While calling the API it returns incorrect json in a certain cases e.g.:
https://rest.bgp-api.net/api/v1/prefix/85.206.0.0/16/search returns incorrect "meta" with the double array closing symbols ']]':

{
  "type": "longest-match",
  "prefix": "85.206.0.0/16",
  "result": {
     "prefix": null,
     "type": "empty-match",
     "meta": []],
     "members": []
  }
}

Fixed in roto-api 0.2.1, which is live at https://rest.bgp-api.net