Improve error handling for serialized job data.

This commit is contained in:
Greyson Parrelli
2025-01-10 12:41:25 -05:00
parent dcddab0992
commit 54ecb0bb53

View File

@@ -27,6 +27,7 @@ import org.whispersystems.signalservice.api.push.exceptions.NonSuccessfulRespons
import org.whispersystems.signalservice.api.push.exceptions.PushNetworkException
import org.whispersystems.signalservice.internal.push.OneTimePreKeyCounts
import java.io.IOException
import java.net.ProtocolException
import java.util.concurrent.TimeUnit
import kotlin.jvm.Throws
import kotlin.time.Duration.Companion.days
@@ -317,6 +318,9 @@ class PreKeysSyncJob private constructor(
} catch (e: IOException) {
Log.w(TAG, "Error deserializing PreKeysSyncJob", e)
PreKeysSyncJob(parameters, forceRotationRequested = false)
} catch (e: ProtocolException) {
Log.w(TAG, "Error deserializing PreKeysSyncJob", e)
PreKeysSyncJob(parameters, forceRotationRequested = false)
}
}
}