Guides

How do I get an alert when my app throws an error?

Report exceptions to an error tracker and let it alert you. Runheed groups repeats of the same bug and alerts once when an error is new, then again if it comes back after you marked it resolved. Alerts go by email, to a Slack or Discord channel, or to your own URL as a signed webhook, each with a prompt to hand to your coding agent.

Why not alert on every exception

A bug in a busy route can throw the same error thousands of times an hour. One message per exception buries the alert that matters. Grouping fixes that: repeats of one bug share a fingerprint and become one error with a count, and the alert fires when that error first appears. Why one bug shows up as hundreds of errors explains how the fingerprint is built.

Set it up

  1. Install the Runheed SDK in your app and initialize it at startup (setup by framework). Uncaught exceptions and unhandled rejections are reported from then on.
  2. Email alerts are on for every new project and go to the workspace owner.
  3. For a channel, create an incoming webhook in Slack (https://hooks.slack.com/services/...) or in a Discord channel's settings (https://discord.com/api/webhooks/...) and paste it into the project under Projects.
  4. For anything else, add your own URL under Projects > Webhook and send a test event from the same form.

What an alert contains

PartWhat it says
TitleNew error in shop-api, or An error came back in shop-api
ErrorThe error type and message
WhereThe file and function it was thrown in, and the environment
CountHow many times it has been seen
Last fixFor an error that came back, the note it was resolved with
PromptA line to paste into your coding agent, such as "Read Runheed error <id>, fix it, and mark it resolved with the commit."

Email, Slack and Discord alerts also link straight into Cursor or Claude Code with that prompt filled in.

Webhooks: start something automatically

A webhook is a POST with a JSON body whose type is error.new, error.reopened or test. It is signed in the Runheed-Signature header with the project's secret (HMAC-SHA256, Stripe-style t= and v1=), and the docs have the code to check it. From there you can open a ticket, page someone, or start a GitHub workflow that hands the error to an agent, as in production errors to GitHub issues.

How many alerts to expect

Each workspace gets at most 20 alert emails and 20 Slack or Discord alerts an hour, plus 60 webhooks, so a bad deploy that throws many kinds of error can't flood the channel. Every error is still recorded and counted past those caps. To read a summary instead of reacting to each alert, set up a daily digest with Claude Code that goes through the list each morning.

Questions

Will I get an alert every time the same error happens?
No. You get one when the error first appears and one if it comes back after being marked resolved. Repeats in between raise its count.
Can I turn off email and keep Slack?
Yes. Email alerts are a per-project setting, separate from the Slack or Discord webhook and your own webhook.
Do errors in the browser trigger alerts?
Yes, if the frontend reports them through a Sentry browser SDK with the project's Sentry SDK DSN (see /for/react). They are grouped and alerted like server errors.
What does it cost?
Alerts are in every plan. Plans start at $29/month for 50,000 events a month, 3 projects and 30 days of history.

Related