[alerts][actions] malformed JSON in webhook body param throws JSON error #81849
Labels
bug
Fixes for quality problems that affect the customer experience
estimate:medium
Medium Estimated Level of Effort
Feature:Alerting/RuleActions
Issues related to the Actions attached to Rules on the Alerting Framework
Feature:Alerting
Team:ResponseOps
Label for the ResponseOps team (formerly the Cases and Alerting teams)
Kibana 7.9.3
If you create a webhook in an any type of alert, whose body parameter is the following string, you can save the alert, but when trying to edit it again, a JSON error will be thrown and the display will end up being cleared.
Technically, JSON where there's a literal
\n
in a property, like above, can cause issues, typically when sending the final rendered JSON to a webhook service. Eg, see issue #79371In this case though, we're seeing an issue when we try to edit the alert again, and the webhook body param editor is hitting a problem.
From the CDT console, the JSON.parse() that's throwing the error is the one in this snippet of code:
kibana/src/plugins/es_ui_shared/__packages_do_not_import__/xjson/json_xjson_translation_tools/index.ts
Lines 70 to 74 in b1aa93f
This is the code which "triple double quotes" strings like we do for Kibana Dev Console, but I don't think we want that behavior for the JSON we're editing in alerts/actions.
The text was updated successfully, but these errors were encountered: