Skip to content

PaginatedIterator should not swallow errors #25

@zlove

Description

@zlove

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions