alexandroid/decompiled/jadx/sources/com/amazonaws/retry/RetryUtils.java
KaKi87 a47fad5135 📦 Add decompiled Alexa 2.2.730155.0 (jadx, apktool, Hermes strings)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 00:04:16 +01:00

44 lines
1.8 KiB
Java

package com.amazonaws.retry;
import com.amazonaws.AbortedException;
import com.amazonaws.AmazonServiceException;
import java.io.InterruptedIOException;
import java.net.SocketTimeoutException;
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
/* loaded from: classes20.dex */
public class RetryUtils {
public static boolean isClockSkewError(AmazonServiceException amazonServiceException) {
if (amazonServiceException == null) {
return false;
}
String errorCode = amazonServiceException.getErrorCode();
return "RequestTimeTooSkewed".equals(errorCode) || "RequestExpired".equals(errorCode) || "InvalidSignatureException".equals(errorCode) || "SignatureDoesNotMatch".equals(errorCode);
}
public static boolean isInterrupted(Throwable th) {
if (th instanceof AbortedException) {
return true;
}
if (th.getCause() == null) {
return false;
}
Throwable cause = th.getCause();
return (cause instanceof InterruptedException) || ((cause instanceof InterruptedIOException) && !(cause instanceof SocketTimeoutException));
}
public static boolean isRequestEntityTooLargeException(AmazonServiceException amazonServiceException) {
if (amazonServiceException == null) {
return false;
}
return "Request entity too large".equals(amazonServiceException.getErrorCode());
}
public static boolean isThrottlingException(AmazonServiceException amazonServiceException) {
if (amazonServiceException == null) {
return false;
}
String errorCode = amazonServiceException.getErrorCode();
return "Throttling".equals(errorCode) || "ThrottlingException".equals(errorCode) || "ProvisionedThroughputExceededException".equals(errorCode);
}
}