> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hologram.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Troubleshooting alert and webhook errors

> This guide reviews troubleshooting steps for some common issues when using alerts and webhooks. You can use webhooks to communicate with applications and services through Hologram SIMs. Using alerts, you can subscribe to events and receive webhook notifications when specific events occur in your fleet. 

## How do I fix a "Webhook connection error"?

This error usually happens when there is a malformed url in your webhook app configuration. The destination url needs to include the protocol.

### Common fixes

* Change the URL from `http://your-webhook-url.com` to `https://your-webhook-url.com`, using the **HTTPS** protocol.

## How do I fix a malformed JSON payload?

If your webhook fails to send, or your endpoint rejects the request, the message payload may not be valid JSON.

### Common fixes

* Double check that the message data payload is properly formatted with valid JSON. Common formatting issues are uses of single quotes and the inclusion of numbers. If in doubt, use a JSON validator.
* Do **not** wrap the `<<tags>>` variable in quotes. It is replaced with a JSON array (e.g. `["_DEVICE_12345_", "_SMS_DO_"]`), so writing `"<<tags>>"` produces invalid JSON. Other variables are replaced with plain text, so string values like `<<device.name>>` and `<<received>>` **do** need quotes inside a JSON payload.
* Remember that the payload is a template: validate it with sample values in place of variables, not with the variables themselves.

## Why does my webhook arrive with an empty or unparseable body?

If your endpoint receives the request but the body is empty or can't be parsed, the alert is most likely missing the JSON content type.

### Common fixes

* When sending a JSON payload, add a `content-type: application/json` header in the webhook configuration. The Hologram Dashboard adds this header automatically when it detects a JSON payload, but alerts created through the API or older alerts may be missing it.
* Send the webhook to an HTTP request inspector such as **RequestBin** to see exactly which headers and body your endpoint receives.

## How do I fix a "Socket error: timed out message"?

**Socket error: timed out messages** are the result of a failure to establish a connection. These are usually associated to devices being offline or not having the correct connection setup, which prevents connections to a SIM from being established.

### Common fixes

* Verify that the device is **online** and that the modem is `**able to connect**`. Some devices may restrict data connections to limit battery usage which can prevent device communication and also cause issues with eUICC operations.
* Verify that the webhook connection setup is correct, especially the **host** and **port**.
* Verify in your dashboard that the SIM is opening sessions and passing data correctly. If you see zero-byte sessions, you may need to troubleshoot the device's connection setup.

## How do I fix an "Error decoding JSON message"?

This generally comes from a misconfigured Alert. If you see an error like "Error decoding JSON for variable `decdata.foobar`", it means you have used an incorrect variable in the message payload.

### Common fixes

* Verify that the message data payload is properly formatted with valid JSON and alert variables. See [available variables](/guides/cloud-and-tools/event-monitoring-and-alerts-overview#event-variables-available-to-use-in-alerts) for more information.
* The `<<decdata.fieldName>>` form only works when the device payload is JSON and the field exists. Verify the field name matches the JSON your device actually sends.
