-
Notifications
You must be signed in to change notification settings - Fork 265
Open
Labels
automatedIssues created by cagentIssues created by cagentkind/bugSomething isn't workingSomething isn't working
Description
🟠 high - bug
File: cmd/root/api.go (line 74)
Code
} else {
defer func() {
if err := recordCleanup(); err != nil {
slog.Error("Failed to cleanup recording proxy", "error", err)
}
}()
}Problem
Similar to the setupFakeProxy cleanup, the recordCleanup function's error is only logged and not propagated. This can lead to silent failures in resource deallocation, potentially leaving behind open files or other system resources.
Suggested Fix
The error returned by recordCleanup() should be handled. It should be returned from runAPICommand or added to a list of errors if multiple cleanup functions are deferred and can fail.
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