API said 'success'. Data was empty.
Started building a price comparison tool last month. Needed product data from multiple sources so I hooked up a bunch of APIs. First vendor looked solid. Clean docs, good examples, test endpoint wo...

Source: DEV Community
Started building a price comparison tool last month. Needed product data from multiple sources so I hooked up a bunch of APIs. First vendor looked solid. Clean docs, good examples, test endpoint worked great. Production returned empty arrays Dev endpoint gave me perfect JSON: { "status": "success", "products": [ {"id": "123", "price": 29.99, "stock": 45} ] } Production? { "status": "success", "products": [] } Status says success. Array is empty. Zero errors. Spent an hour checking my request params. Auth headers looked fine. Rate limits not hit. Nothing wrong. Support told me dev and prod are different Called them after wasting that hour. "Oh yeah production data is paginated, dev isn't." Not in the docs anywhere. Test environment doesn't paginate. Production does. import requests url = "https://api.vendor.com/products" headers = {"Authorization": f"Bearer {token}"} all_products = [] page = 1 while True: response = requests.get(url, headers=headers, params={"page": page}) data = respon