Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@ import { Hono } from 'hono';
import { sentry } from '@sentry/hono/bun';
import { addRoutes } from './routes';

const app = new Hono<{ Bindings: { E2E_TEST_DSN: string } }>();
const app = new Hono();

app.use(
// @ts-expect-error - Env is not yet in type
sentry(app, {
dsn: process.env.E2E_TEST_DSN,
environment: 'qa',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { Hono } from 'hono';
import { HTTPException } from 'hono/http-exception';

export function addRoutes(app: Hono<{ Bindings: { E2E_TEST_DSN: string } }>): void {
export function addRoutes(app: Hono<{ Bindings?: { E2E_TEST_DSN: string } }>): void {
app.get('/', c => {
return c.text('Hello Hono!');
});
Expand Down
2 changes: 1 addition & 1 deletion packages/hono/src/bun/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export interface HonoBunOptions extends Options<BaseTransportOptions> {}
/**
* Sentry middleware for Hono running in a Bun runtime environment.
*/
export const sentry = (app: Hono, options: HonoBunOptions | undefined = {}): MiddlewareHandler => {
export const sentry = (app: Hono, options: HonoBunOptions): MiddlewareHandler => {
const isDebug = options.debug;

isDebug && debug.log('Initialized Sentry Hono middleware (Bun)');
Expand Down
2 changes: 1 addition & 1 deletion packages/hono/src/node/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export interface HonoNodeOptions extends Options<BaseTransportOptions> {}
/**
* Sentry middleware for Hono running in a Node runtime environment.
*/
export const sentry = (app: Hono, options: HonoNodeOptions | undefined = {}): MiddlewareHandler => {
export const sentry = (app: Hono, options: HonoNodeOptions): MiddlewareHandler => {
const isDebug = options.debug;

isDebug && debug.log('Initialized Sentry Hono middleware (Node)');
Expand Down
Loading