Skip to content

Commit

Permalink
Merge pull request #455 from Situphen/sentry
Browse files Browse the repository at this point in the history
[zmarkdown] Fixes Sentry error handling
  • Loading branch information
LikaKavkasidze committed Mar 30, 2022
2 parents 537f031 + 4bf5562 commit 8b2a812
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/zmarkdown/server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@ Sentry.init({

const app = express()

// Sentry error handling
// Sentry request handling
app.use(Sentry.Handlers.requestHandler())
app.use(Sentry.Handlers.errorHandler())

app.use(cors())

Expand All @@ -29,6 +28,9 @@ if (process.env.ZMD_ENV !== 'production') {
app.use('/', require('./routes/endpoints'))
app.use('/munin', require('./routes/munin'))

// Sentry error handling
app.use(Sentry.Handlers.errorHandler())

const server = app.listen(process.env.PORT || 27272, () => {
const host = server.address().address
const port = server.address().port
Expand Down

0 comments on commit 8b2a812

Please sign in to comment.