Incoming webhook trigger should ignore body if 'No issues from the webhook' is selected and invalid body is sent (and support top level arrays)

XMLWordPrintable

    • Severity 3 - Minor
    • 0

      Issue Summary

      Currently if we setup an Incoming Webhook trigger in an Automation rule and select ‘No issues from the webhook’ then post some invalid/unexpected JSON like an array we get an error trying to parse the body and the rule won't execute. Jira should just ignore the body since we don't need to parse it.

      Expected Results

      Jira should ignore the body since we don't need to parse it when 'No issues from the webhook’ is selected.

      Steps to Reproduce

      Create an automation rule using Incoming webhook trigger and trigger a webhook such as the one below:

      curl -X POST -H 'Content-type: application/json' --data '[]' 

      Actual Results

      Rule fails as soon as is triggered and audit log shows an error message similar to the one below:

      There was an error when trying to parse the webhook body to JSON (could be due to un-escaped control characters like newlines):Cannot deserialize instance of `com.codebarrel.automation.api.webhook.IncomingWebhook` out of START_ARRAY token at [Source: (ByteArrayInputStream); line: 1, column: 1] 

      Workaround

      Currently there is no known workaround for this behavior. A workaround will be added here when available

            Assignee:
            Unassigned
            Reporter:
            Ilenice
            Votes:
            10 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated: