-
Notifications
You must be signed in to change notification settings - Fork 302
Open
Labels
automatedIssues created by cagentIssues created by cagentkind/bugSomething isn't workingSomething isn't working
Description
🟡 medium - bug
File: cmd/root/run.go (line 167)
Code
defer func() {
if err := fakeCleanup(); err != nil {
slog.Error("Failed to cleanup fake proxy", "error", err)
}
}()Problem
The error returned by fakeCleanup() is logged but not returned to the caller. This could lead to silent failures where resources are not properly cleaned up, but the program continues to execute as if everything is fine. While slog.Error logs the issue, the main execution flow might not be aware of it, potentially leading to resource leaks or unexpected behavior in long-running processes.
Suggested Fix
Similar to the recordCleanup() issue, if the cleanup is critical, the error should be propagated. Otherwise, acknowledge that it's intentionally logged and ignored.
Found by nightly codebase scan
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
automatedIssues created by cagentIssues created by cagentkind/bugSomething isn't workingSomething isn't working