VECO Webhook with destination <webhook URL> returned error Error: Webhook payload template is not JSON-parseable | Invalid characters within name
search cancel

VECO Webhook with destination <webhook URL> returned error Error: Webhook payload template is not JSON-parseable | Invalid characters within name

book

Article ID: 376214

calendar_today

Updated On:

Products

VMware SD-WAN by VeloCloud VMware VeloCloud SD-WAN

Issue/Introduction

With deploying webhooks for velocloud edges, user might observe webhooks failing for several edges while generating the following error message within the events tab of the VECO: 

Webhook with destination <webhook URL> returned error Error: Webhook payload template is not JSON-parseable

Environment

Configure webhook from the VECO's alert setting section as displayed from the following picture taken from internal none-production edge testbed.

 

Cause

Webooks will fail due to either link name, edge name (deviceName), and/or edge description (deviceDescription) having an invalid special character which causing Json parsing to fail. 

 

The list of invalid special characters for webhooks are:

 

\
\b
\f
\n
\r
\t

 

Here is the Json that is called during webhook. 

{
    "alertTime": "{{alertTime}}",
    "alertType": "{{alertType}}",
    "customerLogicalId": "{{customerLogicalId}}",
    "customer": "{{customer}}",
    "deviceLogicalId": "{{deviceLogicalId}}",
    "deviceDescription": "{{deviceDescription}}",
    "deviceSerialNumber": "{{deviceSerialNumber}}",
    "deviceName": "{{deviceName}}",
    "lastContact": "{{lastContact}}",
    "vco": "{{vco}}",
    "message": "{{message}}",
    "entityAffected": "{{entityAffected}}"
}

Resolution

Remove the invalid special characters from link name, edge name (deviceName), and/or edge description (deviceDescription). once done the webhook call should no longer fail. 

Additional Information

Engineering is working a VCO build that will allow compatibility for the special characters within webhook calls. This is being released on future VCO builds.