PaginatedIterator raises a StopIteration error which masks any HTTPError returned in the requests to the Blueink API. This will, for example, hide any error raised if the API key is invalid, which can be confusing to detect / debug.
Instead, we should probably allow HTTPErrors to be raised by the PaginatedIterator. If the Blueink API returns an error at the end of iteration (which I don't think is the case), we should distinguish between that case and genuine errors, and only raise StopIteration when the HTTPError actually corresponds to reaching the end of the paginated list.
PaginatedIteratorraises aStopIterationerror which masks anyHTTPErrorreturned in the requests to the Blueink API. This will, for example, hide any error raised if the API key is invalid, which can be confusing to detect / debug.Instead, we should probably allow HTTPErrors to be raised by the PaginatedIterator. If the Blueink API returns an error at the end of iteration (which I don't think is the case), we should distinguish between that case and genuine errors, and only raise StopIteration when the HTTPError actually corresponds to reaching the end of the paginated list.