Webhook Error Log

Hi All,
I have setup a webhook to send a post to an API when a new customer is added in ERPNext. I am getting the following error logs whenever a new customer is added.

Traceback (most recent call last):
File “apps/frappe/frappe/utils/background_jobs.py”, line 115, in execute_job
File “apps/frappe/frappe/integrations/doctype/webhook/webhook.py”, line 95, in enqueue_webhook
log_request(webhook.request_url, headers, data, r)
File “apps/frappe/frappe/integrations/doctype/webhook/webhook.py”, line 109, in log_request
“response”: json.dumps(res.json(), indent=4) if res else None
File “env/lib/python3.8/site-packages/requests/models.py”, line 900, in json
return complexjson.loads(self.text, **kwargs)
File “/usr/lib/python3.8/json/init.py”, line 357, in loads
return _default_decoder.decode(s)
File “/usr/lib/python3.8/json/decoder.py”, line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File “/usr/lib/python3.8/json/decoder.py”, line 355, in raw_decode
raise JSONDecodeError(“Expecting value”, s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

This is the request body;
“Name”: “{{doc.name}}”

The webhook is working fine, it sends the POST which is consumed by my API fine on the other end, so I’m not sure why I’m getting this error log. Seems to be pointing to a formatting error in the JSON, but as far as I know, the JSON body is valid JSON.

Any thoughts?

were you able to fix the issue ?

No, I have not been able to resolve this. The webhook works, but it’s still generating errors in the log.