diff --git a/app/src/main/java/org/mozilla/fenix/experiments/NimbusSetup.kt b/app/src/main/java/org/mozilla/fenix/experiments/NimbusSetup.kt index 2919ddadc..a1b94687b 100644 --- a/app/src/main/java/org/mozilla/fenix/experiments/NimbusSetup.kt +++ b/app/src/main/java/org/mozilla/fenix/experiments/NimbusSetup.kt @@ -13,7 +13,7 @@ import mozilla.components.service.nimbus.NimbusAppInfo import mozilla.components.service.nimbus.NimbusDisabled import mozilla.components.service.nimbus.NimbusServerSettings import mozilla.components.support.base.log.logger.Logger -import org.mozilla.experiments.nimbus.internal.NimbusErrorException +import org.mozilla.experiments.nimbus.internal.NimbusException import org.mozilla.fenix.BuildConfig import org.mozilla.fenix.R import org.mozilla.fenix.ext.components @@ -24,7 +24,7 @@ fun createNimbus(context: Context, url: String?): NimbusApi { val errorReporter: ((String, Throwable) -> Unit) = reporter@{ message, e -> Logger.error("Nimbus error: $message", e) - if (e is NimbusErrorException && !e.isReportableError()) { + if (e is NimbusException && !e.isReportableError()) { return@reporter } @@ -106,10 +106,10 @@ fun createNimbus(context: Context, url: String?): NimbusApi { * * This fix should be upstreamed as part of: https://github.com/mozilla/application-services/issues/4333 */ -fun NimbusErrorException.isReportableError(): Boolean { +fun NimbusException.isReportableError(): Boolean { return when (this) { - is NimbusErrorException.RequestError, - is NimbusErrorException.ResponseError -> false + is NimbusException.RequestException, + is NimbusException.ResponseException -> false else -> true } } diff --git a/app/src/test/java/org/mozilla/fenix/experiments/NimbusSetupKtTest.kt b/app/src/test/java/org/mozilla/fenix/experiments/NimbusSetupKtTest.kt index 86dbf2ba6..3713cc578 100644 --- a/app/src/test/java/org/mozilla/fenix/experiments/NimbusSetupKtTest.kt +++ b/app/src/test/java/org/mozilla/fenix/experiments/NimbusSetupKtTest.kt @@ -7,20 +7,20 @@ package org.mozilla.fenix.experiments import org.junit.Assert.assertFalse import org.junit.Assert.assertTrue import org.junit.Test -import org.mozilla.experiments.nimbus.internal.NimbusErrorException +import org.mozilla.experiments.nimbus.internal.NimbusException class NimbusSetupKtTest { @Test fun `WHEN error is reportable THEN return true`() { - val error = NimbusErrorException.IOError("bad error") + val error = NimbusException.IOException("bad error") assertTrue(error.isReportableError()) } @Test fun `WHEN error is non-reportable THEN return false`() { - val error1 = NimbusErrorException.ResponseError("oops") - val error2 = NimbusErrorException.RequestError("oops") + val error1 = NimbusException.ResponseException("oops") + val error2 = NimbusException.RequestException("oops") assertFalse(error1.isReportableError()) assertFalse(error2.isReportableError()) diff --git a/buildSrc/src/main/java/AndroidComponents.kt b/buildSrc/src/main/java/AndroidComponents.kt index 35a668f26..807399aa4 100644 --- a/buildSrc/src/main/java/AndroidComponents.kt +++ b/buildSrc/src/main/java/AndroidComponents.kt @@ -3,5 +3,5 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ object AndroidComponents { - const val VERSION = "94.0.20210909143340" + const val VERSION = "94.0.20210909232434" }