-
Notifications
You must be signed in to change notification settings - Fork 627
Replace old realtime exceptions with new exceptions #4304
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Generated by 🚫 Danger |
Coverage Report 1Affected Products
Test Logs |
The public api surface has changed for the subproject firebase-config: Please update the api.txt files for the subprojects being affected by this change by running ./gradlew ${subproject}:generateApiTxtFile. Also perform a major/minor bump accordingly. |
Size Report 1Affected Products
Test Logs |
The public api surface has changed for the subproject firebase-config: Please update the api.txt files for the subprojects being affected by this change by running ./gradlew ${subproject}:generateApiTxtFile. Also perform a major/minor bump accordingly. |
The public api surface has changed for the subproject firebase-config: Please update the api.txt files for the subprojects being affected by this change by running ./gradlew ${subproject}:generateApiTxtFile. Also perform a major/minor bump accordingly. |
...ase-config/src/main/java/com/google/firebase/remoteconfig/FirebaseRemoteConfigException.java
Outdated
Show resolved
Hide resolved
firebase-config/src/main/java/com/google/firebase/remoteconfig/internal/ConfigAutoFetch.java
Outdated
Show resolved
Hide resolved
...ase-config/src/main/java/com/google/firebase/remoteconfig/FirebaseRemoteConfigException.java
Outdated
Show resolved
Hide resolved
@@ -346,6 +348,11 @@ public synchronized void beginRealtimeHttpStream() { | |||
} | |||
} catch (IOException e) { | |||
Log.d(TAG, "Exception connecting to realtime stream. Retrying the connection..."); | |||
propagateErrors( | |||
new FirebaseRemoteConfigServerException( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like getResponseCode
always return something reasonable, so we can include that here, too https://docs.oracle.com/javase/7/docs/api/java/net/HttpURLConnection.html#getResponseCode()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is for the case where getResponseCode throws an exceptions and isn't able to return a status code. If it has a non-retryable response code anyways it would be caught in the exceptions below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it. Maybe we can consolidate these later to make the error handling more clear.
The public api surface has changed for the subproject firebase-config: Please update the api.txt files for the subprojects being affected by this change by running ./gradlew ${subproject}:generateApiTxtFile. Also perform a major/minor bump accordingly. |
...ase-config/src/main/java/com/google/firebase/remoteconfig/FirebaseRemoteConfigException.java
Outdated
Show resolved
Hide resolved
@@ -346,6 +348,11 @@ public synchronized void beginRealtimeHttpStream() { | |||
} | |||
} catch (IOException e) { | |||
Log.d(TAG, "Exception connecting to realtime stream. Retrying the connection..."); | |||
propagateErrors( | |||
new FirebaseRemoteConfigServerException( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it. Maybe we can consolidate these later to make the error handling more clear.
Update Realtime exceptions to the ones specified in this doc: go/realtime-rc-sdk-exceptions