# Make exceptions land on your phone.

> Get Sentry, Rollbar, and Bugsnag exceptions as push notifications. Point your error tracker webhook at Pocket Alert and catch new issues in under a second.

<!-- source: https://pocketalert.app/use-cases/error-tracking-alerts -->

When Sentry, Rollbar, or Bugsnag catches a new exception, the title and severity land on your phone in under a second. Catch the error before your users report it.

## Three steps to error alerts on your phone

1. **Create a webhook** — Create a Pocket Alert webhook with a GJSON message template and copy its receive URL.
2. **Wire up the tracker** — Paste the URL into a Sentry Internal Integration (or Rollbar/Bugsnag webhook) and attach it to an alert rule.
3. **Map and ship** — GJSON maps data.event.title, culprit, level, and web_url into your push. The next exception buzzes your phone.

## From stack trace to lock screen

Your error tracker already sends a webhook. Pocket Alert turns it into a push you cannot miss.

- **Works with every tracker** — Sentry, Rollbar, Bugsnag, Honeybadger, and Airbrake all fire an outgoing webhook on a new issue. Point it at Pocket Alert and you are done.
- **Map fields with GJSON** — GJSON paths pull data.event.title, data.event.culprit, and data.event.level straight out of the payload into your notification.
- **Level and rule inline** — Show the error level and the rule that fired right in the push so a fatal exception reads differently from a warning.
- **A channel per environment** — Each application has its own webhook URL, so prod, staging, and a specific service stay in separate channels.
- **Sub-second delivery** — The exception hits your phone in under a second, well before the email digest goes out.
- **Secret webhook URL** — The webhook URL is your application secret over HTTPS. Rotate it whenever you need a fresh endpoint.

## Send error alerts to your phone

### 1. Create a Pocket Alert webhook

On the [Webhooks](https://pocketalert.app/webhooks) page create a webhook whose GJSON `message` template reads the Sentry issue-alert payload (everything is nested under `data.event`):

```
curl -X POST "https://api.pocketalert.app/v1/webhooks" \
  -H "Token: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Sentry","default_level":"critical","message":"[%data.event.level%] %data.event.title%\n%data.event.culprit%\n%data.event.web_url%","application_id":"qm47b9pzxzxg"}'
```

You get an inbound URL like `https://p4a.me/wh/1234abcd`.

### 2. Point Sentry at it

In [Settings → Developer Settings → Internal Integration](https://docs.sentry.io/organization/integrations/integration-platform/webhooks/issue-alerts/), set the Webhook URL to your receive URL and enable the Alert Rule Action. Then create an issue alert rule and add the integration as the action:

```
Webhook URL:  https://p4a.me/wh/1234abcd
Permissions:  Issue & Event (Read)
Action:       Alert Rule Action — enabled

Alerts → Create Alert → When a new issue is created
→ Then send a notification via [your integration]
```

Sentry POSTs `{"action":"triggered","data":{"event":{"title":...,"culprit":...,"level":...,"web_url":...}}}`; the GJSON paths above pull those fields into the push.

### 3. Other trackers (Rollbar, Bugsnag)

Rollbar (Settings → Notifications → Webhook) and Bugsnag (Integrations → Generic webhook) emit a flatter payload. Adjust the template to their fields, e.g. `%data.item.title%` for Rollbar or `%error.exceptionClass%` for Bugsnag, and paste the same receive URL.

The [webhook settings docs](https://info.pocketalert.app/api/webhooks/settings.html) cover every GJSON path and webhook option.

## FAQ

### How do I get error alerts on my phone?

In Sentry create an Internal Integration with a webhook URL set to your Pocket Alert receive URL and the Alert Rule Action enabled, then add it to an issue alert rule. When the rule fires, Sentry POSTs the issue and the push reaches your phone in under a second.

### How does field mapping work?

Sentry issue-alert webhooks nest the data under data.event. Pocket Alert reads it with GJSON paths, so you map data.event.title to the notification title and data.event.culprit — or the web_url — into the body, and the push tells you exactly which issue fired.

### Can I show error level and the rule?

The payload carries data.event.level (warning, error, fatal) and the rule name in data.triggered_rule. Reference both in your GJSON message template so a fatal exception reads differently from a warning.

### Can I separate prod and staging?

Give each environment its own application. A prod webhook and a staging webhook land in separate channels, and you can mute staging without touching prod.

### Do I need to install an agent?

Nothing. Pocket Alert just receives the webhook your tracker already sends, so there is no agent or SDK to install. Sentry, Rollbar, Bugsnag, Honeybadger, and Airbrake all support outgoing webhooks.

### Can a production exception break through Do Not Disturb?

Yes. Add "level":"critical" to the message and on Android it posts to a dedicated notification channel that bypasses Do Not Disturb — you grant DND access once. On iPhone, high and critical arrive as time-sensitive notifications that break through Focus modes. Every message accepts a level from silent to critical, so a staging warning can stay quiet while a prod fatal wakes you. On the free plan critical is delivered as high: still instant, just without the DND override.
