Skip to content

Offset / count invariant when you have more than 10,000 messages #194

@silviogutierrez

Description

@silviogutierrez

Hi there,

Thanks for a great library. I'm running into an edge case. If you have more than 10,000 outbound messages, this library will break as the count=None loop will eventually send a request like so:

https://api.postmarkapp.com/messages/outbound?count=500&offset=10000

And per Postmark's docs, the max of count + offset = 10,000.

So you'll get a 500 error from them.

This isn't an issue if the TotalCount in base.py returns less 10,000 because you'll break out of the loop.

I'm not sure how best to handle this. It seems like, no matter what we do, we can't get to message 10,001+ on postmark. So maybe the loop should also just break at 10,000.

Hope that helps. Thanks again for your work!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions