Skip to content

Commit

Permalink
chore: add error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
HarshPatel5940 committed Feb 10, 2024
1 parent a6c41ad commit 73d41ad
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions apps/api/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,16 +92,20 @@ async function initializeNestApp() {
}

async function bootstrap() {
await initializeSentry()
await Sentry.startSpan(
{
op: 'applicationBootstrap',
name: 'Application Bootstrap Process'
},
async () => {
await initializeNestApp()
}
)
try {
await initializeSentry()
await Sentry.startSpan(
{
op: 'applicationBootstrap',
name: 'Application Bootstrap Process'
},
async () => {
await initializeNestApp()
}
)
} catch (error) {
Sentry.captureException(error)
}
}

bootstrap()

0 comments on commit 73d41ad

Please sign in to comment.