Skip to content

Commit feb8bc0

Browse files
committed
fix: respect graceful mode on init
1 parent 5d34a44 commit feb8bc0

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/main/java/cloud/eppo/EppoClient.java

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,15 @@ public EppoClient buildAndInit() {
197197
pollingIntervalMs,
198198
pollingIntervalMs / DEFAULT_JITTER_INTERVAL_RATIO);
199199

200-
// Kick off the first fetch
201-
fetchConfigurationsTask.run();
200+
// Kick off the first fetch, respecting graceful mode.
201+
try {
202+
fetchConfigurationsTask.run();
203+
} catch (RuntimeException e) {
204+
log.error("Encountered Exception while loading configuration", e);
205+
if (!isGracefulMode) {
206+
throw e;
207+
}
208+
}
202209

203210
return instance;
204211
}

0 commit comments

Comments
 (0)