Skip to content

Commit

Permalink
only log mesage when it isnt failure to find alert object
Browse files Browse the repository at this point in the history
  • Loading branch information
gmmorris committed Apr 14, 2020
1 parent 2eb2639 commit c50ec7d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion x-pack/plugins/alerting/server/task_runner/task_runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,12 @@ export class TaskRunner {
};
},
(err: Error) => {
this.logger.error(`Executing Alert "${alertId}" has resulted in Error: ${err.message}`);
const message = `Executing Alert "${alertId}" has resulted in Error: ${err.message}`;
if (isAlertSavedObjectNotFoundError(err, alertId)) {
this.logger.debug(message);
} else {
this.logger.error(message);
}
return {
...originalState,
previousStartedAt,
Expand Down

0 comments on commit c50ec7d

Please sign in to comment.