File tree Expand file tree Collapse file tree 1 file changed +7
-11
lines changed Expand file tree Collapse file tree 1 file changed +7
-11
lines changed Original file line number Diff line number Diff line change @@ -2,18 +2,14 @@ import * as Sentry from '@sentry/nextjs'
2
2
3
3
async function handler ( req , res ) {
4
4
try {
5
- try {
6
- throw new Error ( 'API Test 4' )
7
- } catch ( error ) {
8
- Sentry . captureException ( error )
9
- }
10
-
11
- // Flushing before returning is necessary if deploying to Vercel, see
12
- // https://vercel.com/docs/platform/limits#streaming-responses
13
- await Sentry . flush ( 2000 )
14
- } catch ( err ) {
15
- console . log ( err )
5
+ throw new Error ( 'API Test 4' )
6
+ } catch ( error ) {
7
+ Sentry . captureException ( error )
16
8
}
9
+
10
+ // Flushing before returning is necessary if deploying to Vercel, see
11
+ // https://vercel.com/docs/platform/limits#streaming-responses
12
+ await Sentry . flush ( 2000 )
17
13
res . status ( 200 ) . json ( { name : 'John Doe' } )
18
14
}
19
15
You can’t perform that action at this time.
0 commit comments