Skip to content

Commit

Permalink
fix: Error handling for flag config refresh()
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Yiu authored and Tim Yiu committed Oct 10, 2023
1 parent b28edf4 commit cd72312
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/main/kotlin/flag/FlagConfigService.kt
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,13 @@ internal class FlagConfigServiceImpl(

private fun refresh() {
Logger.d("Refreshing flag configs.")
val flagConfigs = fetchFlagConfigs()
storeFlagConfigs(flagConfigs)
Logger.d("Refreshed ${flagConfigs.size} flag configs.")
try {
val flagConfigs = fetchFlagConfigs()
storeFlagConfigs(flagConfigs)
Logger.d("Refreshed ${flagConfigs.size} flag configs.")
} catch (e: Exception) {
Logger.e("Failed to refresh flag configs.", e)
}
}

override fun start() {
Expand Down

0 comments on commit cd72312

Please sign in to comment.