honojs-middleware/deno_dist/index.ts

20 lines
531 B
TypeScript
Raw Normal View History

2022-08-04 07:54:30 +08:00
import type { Handler } from 'https://raw.githubusercontent.com/honojs/hono/v2.0.6/deno_dist/mod.ts'
2022-08-10 03:09:45 +08:00
// import Toucan from '../node_modules/toucan-js/dist/index.d.ts'
2022-08-04 07:54:30 +08:00
2022-08-10 00:32:06 +08:00
export const sentry = (): Handler => {
2022-08-04 07:54:30 +08:00
return async (c, next) => {
2022-08-10 03:09:45 +08:00
// const sentry = new Toucan({
// dsn: c.env.SENTRY_DSN,
// request: c.req,
// allowedHeaders: ['user-agent'],
// allowedSearchParams: /(.*)/,
// })
2022-08-10 00:08:36 +08:00
2022-08-10 00:32:06 +08:00
// try {
2022-08-10 03:09:45 +08:00
await next()
2022-08-10 00:32:06 +08:00
// } catch (error) {
// sentry.captureException(error)
// }
2022-08-04 07:54:30 +08:00
}
}