diff --git a/apollo-runtime/src/main/java/com/apollographql/apollo/internal/RealApolloStore.java b/apollo-runtime/src/main/java/com/apollographql/apollo/internal/RealApolloStore.java index 687e3acdb7..df7b354489 100644 --- a/apollo-runtime/src/main/java/com/apollographql/apollo/internal/RealApolloStore.java +++ b/apollo-runtime/src/main/java/com/apollographql/apollo/internal/RealApolloStore.java @@ -113,8 +113,18 @@ public RealApolloStore(@NotNull NormalizedCache normalizedCache, @NotNull CacheK iterableSubscribers = new LinkedHashSet<>(subscribers); } + RuntimeException firstException = null; for (RecordChangeSubscriber subscriber : iterableSubscribers) { - subscriber.onCacheRecordsChanged(changedKeys); + try { + subscriber.onCacheRecordsChanged(changedKeys); + } catch (RuntimeException e) { + if (firstException == null) { + firstException = e; + } + } + } + if (firstException != null) { + throw firstException; } }