mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: Enable errorlint linter (#29227)
* Enable errorlint linter * Handle wrapped errors Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com> Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
This commit is contained in:
@@ -59,12 +59,12 @@ func (handler *defaultResultHandler) handle(evalContext *EvalContext) error {
|
||||
}
|
||||
|
||||
if err := bus.Dispatch(cmd); err != nil {
|
||||
if err == models.ErrCannotChangeStateOnPausedAlert {
|
||||
if errors.Is(err, models.ErrCannotChangeStateOnPausedAlert) {
|
||||
handler.log.Error("Cannot change state on alert that's paused", "error", err)
|
||||
return err
|
||||
}
|
||||
|
||||
if err == models.ErrRequiresNewState {
|
||||
if errors.Is(err, models.ErrRequiresNewState) {
|
||||
handler.log.Info("Alert already updated")
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user