Skip to content

Commit 580fa21

Browse files
chore: improve recovery suggestions during lost connectivity (#1016)
1 parent da10afb commit 580fa21

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

aws-api/src/main/java/com/amplifyframework/api/aws/SubscriptionEndpoint.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -209,9 +209,8 @@ private void notifySubscriptionCompleted(String subscriptionId) throws ApiExcept
209209
private void notifyError(Throwable error) {
210210
for (Subscription<?> dispatcher : new HashSet<>(subscriptions.values())) {
211211
dispatcher.dispatchError(new ApiException(
212-
"Subscription failed.",
213-
error,
214-
AmplifyException.TODO_RECOVERY_SUGGESTION
212+
"Subscription failed.", error,
213+
"Check your Internet connection. Is your device online?"
215214
));
216215
}
217216
}
@@ -345,7 +344,7 @@ boolean awaitSubscriptionReady() {
345344
if (!subscriptionReadyAcknowledgment.await(ACKNOWLEDGEMENT_TIMEOUT, TimeUnit.SECONDS)) {
346345
dispatchError(new ApiException(
347346
"Timed out waiting for subscription start_ack.",
348-
AmplifyException.TODO_RECOVERY_SUGGESTION
347+
"Check your Internet connection. Is your device online?"
349348
));
350349
return false;
351350
} else if (failed) {

0 commit comments

Comments
 (0)