forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Response Ops][Actions] Logging errors from the mustache lambda forma…
…t functions (elastic#176014) Resolves elastic#173972 ## Summary Changing to log and return error string instead of throwing error inside the mustache format lambda functions. When an error occurs, the lambda will return the error message. This allows the rest of the action message to be rendered, while giving the user some indication an error occurred and logging the error in a way that is discoverable in the logs. ## To verify Create a rule and add a message like: ``` {{alert.id}} - {{#FormatDate}} {{{context.nope}}} ; America/New_York ; dddd MMM Do YYYY HH:mm:ss.SSS {{/FormatDate}} ``` When the rule runs and triggers and alert, you should see the alert ID in the notification message along with a `date is empty` message and an error log indicating that the date formatting was unsuccessful due to empty date. --------- Co-authored-by: kibanamachine <[email protected]>
- Loading branch information
1 parent
450f9f6
commit 11593f0
Showing
33 changed files
with
404 additions
and
194 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.