fix(deno): support new version of Hono
parent
2460e82976
commit
b65e4a6169
|
@ -1,7 +1,7 @@
|
|||
import type { Context, Handler } from 'https://raw.githubusercontent.com/honojs/hono/v2.0.6/deno_dist/mod.ts'
|
||||
import type { Context, Handler } from 'https://raw.githubusercontent.com/honojs/hono/v2.2.5/deno_dist/mod.ts'
|
||||
import Toucan from 'https://cdn.skypack.dev/toucan-js@2.6.1'
|
||||
|
||||
declare module 'https://raw.githubusercontent.com/honojs/hono/v2.0.6/deno_dist/mod.ts' {
|
||||
declare module 'https://raw.githubusercontent.com/honojs/hono/v2.2.5/deno_dist/mod.ts' {
|
||||
interface ContextVariableMap {
|
||||
sentry: Toucan
|
||||
}
|
||||
|
@ -48,11 +48,9 @@ export const sentry = (options?: Options, callback?: (sentry: Toucan) => void):
|
|||
c.set('sentry', sentry)
|
||||
if (callback) callback(sentry)
|
||||
|
||||
try {
|
||||
await next()
|
||||
} catch (error) {
|
||||
sentry.captureException(error)
|
||||
throw error
|
||||
if (c.error) {
|
||||
sentry.captureException(c.error)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
export { assert, assertEquals } from 'https://deno.land/std@0.148.0/testing/asserts.ts'
|
||||
export { Hono } from 'https://deno.land/x/hono@v2.0.6/mod.ts'
|
||||
export { Hono } from 'https://deno.land/x/hono@v2.2.5/mod.ts'
|
||||
|
|
Loading…
Reference in New Issue