Skip to content

Commit ab731c9

Browse files
committed
Ad too many requests status code to retryable errors.
1 parent f8450dc commit ab731c9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

firebase-config/src/main/java/com/google/firebase/remoteconfig/internal/ConfigRealtimeHttpClient.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
import static com.google.firebase.remoteconfig.FirebaseRemoteConfig.TAG;
1818
import static com.google.firebase.remoteconfig.RemoteConfigConstants.REALTIME_REGEX_URL;
19+
import static com.google.firebase.remoteconfig.internal.ConfigFetchHandler.HTTP_TOO_MANY_REQUESTS;
1920

2021
import android.annotation.SuppressLint;
2122
import android.content.Context;
@@ -309,6 +310,7 @@ public void onError(Exception error) {
309310
// HTTP status code that the Realtime client should retry on.
310311
private boolean isStatusCodeRetryable(int statusCode) {
311312
return statusCode == HttpURLConnection.HTTP_CLIENT_TIMEOUT
313+
|| statusCode == HTTP_TOO_MANY_REQUESTS
312314
|| statusCode == HttpURLConnection.HTTP_BAD_GATEWAY
313315
|| statusCode == HttpURLConnection.HTTP_UNAVAILABLE
314316
|| statusCode == HttpURLConnection.HTTP_GATEWAY_TIMEOUT

0 commit comments

Comments
 (0)