Skip to content

Commit

Permalink
chore: обнление мониторинга
Browse files Browse the repository at this point in the history
  • Loading branch information
mxseev committed Jul 7, 2022
1 parent be4c42c commit 728362a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"typescript": "4.7.4"
},
"dependencies": {
"@gooditworks/monitoring": "1.5.1",
"@gooditworks/monitoring": "1.5.2",
"classnames": "2.3.1",
"next": "12.2.0",
"next-axiom": "0.10.0",
Expand Down
3 changes: 1 addition & 2 deletions src/pages/api/test.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import {NextApiHandler} from "next"
import {withSentry} from "@gooditworks/monitoring/next"
import {Sentry} from "@gooditworks/monitoring/logger/capturer/sentryNext"

const testHandler: NextApiHandler = (request, response) => {
if (request.query.throw) {
Sentry.captureException(new Error(`triggered test exception: ${request.query.throw}`))
throw new Error(`triggered test exception: ${request.query.throw}`)
}

return response.status(200).json({success: true})
Expand Down

0 comments on commit 728362a

Please sign in to comment.