(app: Hono<E>, options: HonoDenoOptions)
| 12 | * Sentry middleware for Hono running in a Deno runtime environment. |
| 13 | */ |
| 14 | export const sentry = <E extends Env>(app: Hono<E>, options: HonoDenoOptions): MiddlewareHandler => { |
| 15 | options.debug && debug.log('Initialized Sentry Hono middleware (Deno)'); |
| 16 | |
| 17 | init(options); |
| 18 | |
| 19 | applyPatches(app); |
| 20 | |
| 21 | return async (context, next) => { |
| 22 | requestHandler(context, getConnInfo); |
| 23 | |
| 24 | await next(); // Handler runs in between Request above ⤴ and Response below ⤵ |
| 25 | |
| 26 | responseHandler(context, options.shouldHandleError); |
| 27 | }; |
| 28 | }; |
no test coverage detected