September 25, 2026
Node.js / Express / MongoDB
Completed
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.
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.
The Buggy Code
const products = await Product.find()
.skip(page * limit)
.limit(limit);
Submit Your Solution
Log in to submit
You must be logged in to participate in the Daily Bug challenge and earn giveaway points.
Log InMonthly Giveaway
Every approved solution gives you an entry into our monthly Bug Finder giveaway pool.
Solve to enter
Successful Solvers
No approved solutions yet.