Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ protected boolean isCacheEntryStale(String cachePath, String key, Long refreshIn
}
return isStale;
} catch (Throwable e) {
log.error("Error checking cache entry age: {}", e.getMessage());

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🦩 πŸ”΄ Cache-entry-age check logs only exception message, discarding stack trace

In isCacheEntryStale (catch block around line 74), changed log.error("Error checking cache entry age: {}", e.getMessage()); to log.error("Error checking cache entry age", e);, passing the exception object so the stack trace is preserved.

πŸ€– Prompt for AI agents
In backend/src/main/java/cx/flamingo/analysis/cache/CacheServiceAbs.java around line 74, review and complete this code-review fix: Cache-entry-age check logs only exception message, discarding stack trace.
What the draft fix changed: In isCacheEntryStale (catch block around line 74), changed `log.error("Error checking cache entry age: {}", e.getMessage());` to `log.error("Error checking cache entry age", e);`, passing the exception object so the stack trace is preserved.
Verify the change is correct and complete; do not refactor unrelated code.

fix confidence: 🟒 95 high β€” react πŸ‘/πŸ‘Ž to teach the reviewer

log.error("Error checking cache entry age", e);
return true; // Consider it stale if we can't check
}
}
Expand Down Expand Up @@ -161,7 +161,7 @@ protected <T> Optional<T> doHttpCall(Supplier<T> supplier, String cachePath, Str
put(cachePath, cacheKey, response);
return Optional.of(response);
} catch (Exception e) {
log.error("Error fetching data: {}", e.getMessage());
log.error("Error fetching data", e);
return Optional.empty();
}
}
Comment on lines 161 to 167

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🦩 πŸ”΄ Exception swallowed with message-only logging instead of full exception object

In doHttpCall (catch block around line 155), changed log.error("Error fetching data: {}", e.getMessage()); to log.error("Error fetching data", e);, passing the exception object so the stack trace is preserved.

πŸ€– Prompt for AI agents
In backend/src/main/java/cx/flamingo/analysis/cache/CacheServiceAbs.java around line 155, review and complete this code-review fix: Exception swallowed with message-only logging instead of full exception object.
What the draft fix changed: In doHttpCall (catch block around line 155), changed `log.error("Error fetching data: {}", e.getMessage());` to `log.error("Error fetching data", e);`, passing the exception object so the stack trace is preserved.
Verify the change is correct and complete; do not refactor unrelated code.

fix confidence: 🟒 95 high β€” react πŸ‘/πŸ‘Ž to teach the reviewer

Expand Down Expand Up @@ -247,3 +247,4 @@ public void setCacheMode(CacheMode cacheMode) {
this.cacheMode = cacheMode;
}
}