mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-10-02 18:02:41 +01:00
Handle ChatServiceException in response processors.
This commit is contained in:
1 parent
91eeda6c6e
commit
4c0ca48af3
1 file changed
+2
-1
+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);
|
||||
|
||||
Reference in new issue
Block a user