Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Catch & encapsulate RateLimitExceptions on send #31

Closed

Conversation

haffenloher
Copy link

Repeatedly requesting prekeys for unregistered group members can lead to RateLimitExceptions, making the send job fail and leading to 4 retries. If that happens, those who precede the unregistered user in the list of group members receive the message 5 times, while the others don't receive it at all.

To work around this, catch and encapsulate RateLimitExceptions and rethrow them at the end, just like with PushNetworkExceptions, UnregisteredUserExceptions, and UntrustedIdentityExceptions.

Fixes signalapp/Signal-Android#6003 (tested in an API 23 emulator)


Note: I copied the pattern of NetworkFailureException wrapping PushNetworkException here, so RateLimitExceededException wraps RateLimitException. Not sure if the name is good, but I wanted to include the recipient's number in case it's needed later.

Repeatedly requesting prekeys for unregistered group members can lead to
RateLimitExceptions, making the send job fail and leading to 4 retries.
If that happens, those who precede the unregistered user in the list of
group members receive the message 5 times, while the others don't
receive it at all.

To work around this, catch and encapsulate RateLimitExceptions and
rethrow them at the end, just like with PushNetworkExceptions,
UnregisteredUserExceptions, and UntrustedIdentityExceptions.

Fixes signalapp/Signal-Android#6003
@haffenloher
Copy link
Author

Made obsolete by a server change (signalapp/Signal-Android#6175 (comment)), closing.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant