-
Notifications
You must be signed in to change notification settings - Fork 3
[Bug]: DataFixerHealthIndicator returns DOWN on first domain failure, discarding other results #214
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't working
Milestone
Description
AI REVIEWED
Module: spring-boot-starter
File: spring/actuator/DataFixerHealthIndicator.java (~line 181-196)
Severity: Medium
Summary
The health check iterates over domains but returns Health.down() immediately on the first failure. Details from already-checked healthy domains are discarded, giving an incomplete picture.
Expected Behavior
All domains should be checked. The final health status should be DOWN if any domain failed, but all details (healthy and unhealthy) should be included.
Actual Behavior
for (Map.Entry<String, AetherDataFixer> entry : fixers.entrySet()) {
try { /* ... */ }
catch (Exception e) {
return Health.down()... // exits immediately, loses prior domain details
}
}Suggested Fix
Collect all results, then decide:
boolean allHealthy = true;
Health.Builder builder = Health.up();
for (...) {
try {
builder.withDetail(domain + ".status", "UP");
} catch (Exception e) {
allHealthy = false;
builder.withDetail(domain + ".status", "DOWN");
builder.withDetail(domain + ".error", e.getMessage());
}
}
return allHealthy ? builder.build() : Health.down().withDetails(builder.build().getDetails()).build();Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working