Every 500 arrives with the request that caused it.
A stack trace on its own is half the story. bughq attaches the route, method, release, and environment to each server error, so triage starts with the facts instead of grepping a log for the surrounding lines.
import { bughq } from '@bughq/sdk'
bughq.init({
key: 'bughq_3c88ef2b5b7c42a9963792eaee64754d',
release: 'api@2.14.0',
environment: 'production',
})
// uncaught exceptions and unhandled rejections across
// requests, workers, and cron jobs report through one SDK
Where it earns its keep
Request handlers
An unhandled exception in a route reports with the method, path, status, and the release serving that request.
Background jobs and queues
A worker that throws mid-batch is captured with the job name and payload shape, not lost to a detached process.
Edge and serverless
Short-lived functions flush their errors before the runtime tears down, so nothing is dropped on cold exit.
Scheduled tasks
A cron that fails at 3am is grouped and counted like any other issue, ready in the morning with its own history.
Full request
Route, method, status, and metadata attach to every server error.
One SDK
Requests, workers, and cron jobs report through the same init call.
By deploy
Each event is tagged with its release, so a regression names its own build.