Fetch all pages until an empty batch

0
Sign in

Page through a batched API until it returns an empty batch, collecting every record without fetching forever on errors. Reported on 1point3acres' Sierra bank; reconstructed in our own words.

SierraCodingEasy

Sign in to see the worked answer

The full answer, chapter by chapter, with what interviewers expect at each level. Free with an account: one full answer per company.