mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 12:07:28 +00:00
Explain a rate limiting push gateway in the notification troubleshooter (#7448)
* Explain a rate limiting push gateway in the notification troubleshooter The push loop back test printed whatever HTTP status the gateway answered, so a user throttled by the public ntfy.sh gateway was told "Error: HTTP 507", which reads as a server fault rather than as a quota they can wait out or move away from. Map the two statuses that mean the notification was throttled onto a typed failure and give the troubleshooter a message that says what to do. * Import strings from localazy, remove `temporary.xml` in `:libraries:push:impl` --------- Co-authored-by: Jorge Martín <jorgem@element.io>
This commit is contained in:
+5
@@ -10,4 +10,9 @@ package io.element.android.libraries.push.api.gateway
|
||||
|
||||
sealed class PushGatewayFailure : Exception() {
|
||||
class PusherRejected : PushGatewayFailure()
|
||||
|
||||
/**
|
||||
* The gateway refused the notification because too many were sent to it.
|
||||
*/
|
||||
class RateLimited : PushGatewayFailure()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user