[components] Closes https://github.com/mozilla-mobile/android-components/issues/5677: Catch all known non-fatal push errors
Previously, we wanted to throw on all unknown push errors so that we were notified on them. Since this seems to be more common than originally expected, we should just catch them and in a future version, we should log them without crashing. All of these push errors can be considered recoverable except for InternalPanic.
This commit is contained in:
@@ -95,7 +95,7 @@ class AbstractAmazonPushServiceTest {
|
||||
verify(processor).onError(captor.capture())
|
||||
|
||||
assertTrue(captor.value is PushError.Registration)
|
||||
assertTrue(captor.value.desc.contains("registration failed"))
|
||||
assertTrue(captor.value.message.contains("registration failed"))
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -111,7 +111,7 @@ class AbstractAmazonPushServiceTest {
|
||||
verify(processor).onError(captor.capture())
|
||||
|
||||
assertTrue(captor.value is PushError.MalformedMessage)
|
||||
assertTrue(captor.value.desc.contains("NoSuchElementException"))
|
||||
assertTrue(captor.value.message.contains("NoSuchElementException"))
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user