Sentry Simple Example 🚨
This example demonstrates how to record unhandled exceptions in your code with Sentry. There are several test pages below that result in various kinds of unhandled exceptions.
Important: exceptions in development mode take a different path than in production. These tests should be run on a production build (i.e. 'next build'). Read more
- Server exceptions
- getServerSideProps throws an Error. This should cause _error.js to render and record Error('Server Test 1') in Sentry. Open in a new tab
- getServerSideProps returns a Promise that rejects. This should cause _error.js to render and record Error('Server Test 2') in Sentry. Open in a new tab
- getServerSideProps calls a Promise that rejects, but does not handle the rejection or await its result (returning synchronously). Sentry should record Error('Server Test 3'). Open in a new tab
- Client exceptions