Closed matux closed 1 year ago
@cyrusradfar Agreed, rate limiting is an important next step. I've already thought how to implement it by turning the internal pipeline (from notification to http transport) into a stream of data over time, this is gonna be fun.
Regarding server errors, right now we're handling 429 (Too many requests) and 5xx by suspending transactions for at least 30 seconds which was how it was originally implemented before I came in.
Client errors 413 (Payload Too Large) and 422 (Unprocessable Entity) discard the payload altogether (with a log) to avoid repeatedly sending payloads that may be incorrectly formatted due to a bug.
Appreciate that, thanks for the response.
Description of the change
This PR greatly improves how we handle corner cases and unexpected states when posting occurrences, and how we deal with persistence.
This should take care of all 3 issues listed in this PR.
This is an integral part of the upcoming 1.1.0 version.
Reviewing
CI may fail since it ignores our depency overrides and tries to compile against the library currently published, this is on the to-do list.
Type of change
Related issues
Checklists
Development
Code review