Skip to content

Commit

Permalink
Add error msg to the log on UpdateChaosExperiment (#4905)
Browse files Browse the repository at this point in the history
* Add error msg to the log

Signed-off-by: DongYoung Kim <[email protected]>

* Change error to log message for better debugging

Signed-off-by: DongYoung Kim <[email protected]>

---------

Signed-off-by: DongYoung Kim <[email protected]>
  • Loading branch information
kwx4957 authored Oct 11, 2024
1 parent 5e1ec25 commit ff85c86
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1222,7 +1222,7 @@ func (c *ChaosExperimentRunHandler) ChaosExperimentRunEvent(event model.Experime

err = c.chaosExperimentOperator.UpdateChaosExperiment(sessionContext, filter, update)
if err != nil {
logrus.Error("Failed to update experiment collection")
logrus.WithError(err).Error("Failed to update experiment collection")
return err
}
} else if experimentRunCount > 0 {
Expand Down Expand Up @@ -1257,7 +1257,7 @@ func (c *ChaosExperimentRunHandler) ChaosExperimentRunEvent(event model.Experime

err = c.chaosExperimentOperator.UpdateChaosExperiment(sessionContext, filter, update)
if err != nil {
logrus.Error("Failed to update experiment collection")
logrus.WithError(err).Error("Failed to update experiment collection")
return err
}
}
Expand Down

0 comments on commit ff85c86

Please sign in to comment.