Handle ChatServiceException in response processors.

This commit is contained in:
Cody Henthorne authored and Greyson Parrelli committed 2024-07-16 16:54:38 -04:00
1 parent 91eeda6c6e
commit 4c0ca48af3
1 file changed
+2 -1
@@ -1,6 +1,7 @@
package org.whispersystems.signalservice.internal;
import org.signal.libsignal.net.ChatServiceException;
import org.whispersystems.signalservice.api.push.exceptions.NonSuccessfulResponseCodeException;
import org.whispersystems.signalservice.api.util.OptionalUtil;
import org.whispersystems.signalservice.api.util.Preconditions;
@@ -48,7 +49,7 @@ public abstract class ServiceResponseProcessor<T> {
throw (IOException) error;
} else if (error instanceof RuntimeException) {
throw (RuntimeException) error;
} else if (error instanceof InterruptedException || error instanceof TimeoutException) {
} else if (error instanceof InterruptedException || error instanceof TimeoutException || error instanceof ChatServiceException) {
throw new IOException(error);
} else {
throw new IllegalStateException("Unexpected error type for response processor", error);