Skip to content

Commit

Permalink
Fix error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
evan-bradley committed Jun 13, 2023
1 parent f759c9b commit d5cddf6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/opampsupervisor/supervisor/commander/commander.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ func (c *Commander) watch() {
// cmd.Wait returns an exec.ExitError when the Collector exits unsuccessfully or stops
// after receiving a signal. The Commander caller will handle these cases, so we filter
// them out here.
if ok := errors.Is(err, &exec.ExitError{}); err != nil && !ok {
var exitError *exec.ExitError
if ok := errors.As(err, &exitError); err != nil && !ok {
c.logger.Error("An error occurred while watching the agent process", zap.Error(err))
}

Expand Down

0 comments on commit d5cddf6

Please sign in to comment.