Your First Caught Error
Throw a test error, see it in your dashboard, and run your first AI investigation.
This guide walks you through the full loop: throw an error, see it appear in DeepTracer, and let AI explain what went wrong. Takes about 2 minutes.
Before starting, make sure you've added DeepTracer to your app. You need a working setup with your API key configured.
Throw a test error
Add this to any API route or server component in your app:
export async function GET() {
throw new Error("Testing DeepTracer — delete this!")
}Then visit http://localhost:3000/api/test-error in your browser.
export default function TestErrorPage() {
throw new Error("Testing DeepTracer — delete this!")
return null
}Then visit http://localhost:3000/test-error in your browser.
app.get("/test-error", () => {
throw new Error("Testing DeepTracer — delete this!")
})Then visit http://localhost:3000/test-error in your browser.
Check your dashboard
Open your DeepTracer dashboard at app.deeptracer.dev and click the Errors tab in the sidebar.
You should see your test error appear within a few seconds. It will show up as an error group with:
- The error message: "Testing DeepTracer — delete this!"
- Severity: Medium (the default)
- Occurrence count: 1
Click into the error
Click on the error group to see the full details:
- Stack trace — The exact file and line where the error was thrown
- Metadata — Request info, environment, service name
- Timeline — When this error first appeared and when it last occurred
Run an AI investigation
Click the "Investigate" button. DeepTracer's AI will analyze the error in real-time. You'll see each section stream in as it works:
- Summary — A one-paragraph explanation of what happened
- Root cause — The specific line of code that caused the error
- Evidence — Surrounding logs and trace data
- Suggested fix — What to change in your code
For a test error like this, the investigation will be straightforward — but for real production bugs with complex stack traces and related logs, this is where DeepTracer really shines.
Mark it as resolved
Once you've read the investigation, click "Resolve" to close the error group. You can add a resolution note like "Test error — removed."
If this error ever happens again, DeepTracer will automatically reopen the group and notify you.
Clean up
Delete the test error from your code:
// Delete the test route / component you added in step 1That's it. You've seen the full error lifecycle: throw, catch, investigate, resolve.
What's next?
Now that you've seen how error tracking works, try these:
- Track your AI costs — Monitor OpenAI and Anthropic spend
- Set up alerts — Get Slack notifications when real errors happen
- Add custom logging — Use
logger.info()andlogger.error()in your code