digitalepidemiologylab / foodrepo_api

FoodRepo API
Other
60 stars 6 forks source link

/products endpoint returns 500 when 'page' parameter is used #11

Closed bkDJ closed 7 years ago

bkDJ commented 7 years ago

https://www.openfood.ch/api/v2/products?page=2

{
  "status": "500",
  "error": "Internal Server Error"
}
bkDJ commented 7 years ago

The two issues here were:

  1. page isn't a real parameter on that endpoint. Instead, page[size] and page[number] are the correct parameters, and using a number (in this case, 2) for page was causing error 500.
  2. The documentation didn't match the spec as described in point 1, and was using a bad parameter.

Both of those issues have been fixed.