Daily Bug Test
Every day we post a broken code snippet. Solve it correctly, earn points, and enter the Monthly Bug Finder Giveaway!
No active bug today
The admin is brewing some coffee. Check back tomorrow for a new challenge!
Past Challenges
API returns duplicate records after pagination
The API returns paginated products using page and limit. When requesting consecutive pages, some products appear in both pages. For example, page 1 may return products 1–20, while page 2 unexpectedly contains some of the same products from page 1. The API should return unique records across pages.
Cannot read properties of undefined when mapping API response
The React component crashes when the API returns an empty or unexpected response. The error occurs when .map() is called on a value that is undefined instead of an array. The goal is to safely handle the API response and prevent the component from crashing when no data is returned.