How to use Sentry to find frontend errors
Your server can look healthy while a button fails in Safari. Here's how to get that browser error into Sentry and use it to fix the bug.

Corbin Brown
2 min read
On this page
Sentry reports errors from your app, including browser failures your server may never see. Imagine a newsletter form whose Subscribe button throws an error in Safari before it sends a request. Your server logs have nothing to show you, but Sentry's browser integration can collect that error and tell you where it happened.
Get one test error into Sentry
- 1Create a Sentry project for your framework. If you use Next.js, follow the official guide so you capture errors on the parts of the app you use, including the browser.
- 2Ask your coding agent to wire up the SDK, the library that sends events to Sentry. Have it show you where it set the DSN, the address that tells the SDK where to send those events.
- 3Trigger a deliberate test error in local development or a preview. Open Sentry Issues and confirm the event arrived in the expected project and environment. Remove any temporary test button before shipping.
- 4Try the real flow in the browsers your users use. If your app catches a failed request to show a friendly message, capture the unexpected failure explicitly where it is handled. Expected outcomes, like an invalid email field, can stay as ordinary validation.
A console message confirms that a line of code ran. The event in Sentry confirms that the report reached the place where you can investigate it. Sentry's Next.js setup guide
Turn an issue into a fix
Start with the affected browser, the release, and the stack trace, which is the trail of code that led to the error. Source maps tie compressed production code back to the file and line your agent can read. Give the agent the error and a safe reproduction such as “Submit the newsletter form in Safari.” Ask it to show the failing step and prove the same flow works after the fix.
Group alerts around user impact. A repeated checkout error deserves attention faster than a one-off failure from a browser extension. Use event counts and affected users to decide what to investigate first, and leave credentials and raw form values out of the event details you share.
FAQ
Does Sentry replace my server logs?
Keep both. Sentry shows grouped errors and their context. Server logs let you trace what the backend did when it received a request.
Do I need to add a Sentry call to every button?
Start with the SDK's automatic capture. Add deliberate reporting where you catch an unexpected failure yourself and need that failure visible in Sentry.