Skip to content

Commit e38dfef

Browse files
authored
fix(hono): Align error mechanism (#19831)
Mentioned here: #19817 (comment) Closes #19832 (added automatically)
1 parent e2ee8ba commit e38dfef

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

dev-packages/cloudflare-integration-tests/suites/hono-sdk/test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ it('Hono app captures parametrized errors (Hono SDK)', async ({ signal }) => {
1717
stacktrace: {
1818
frames: expect.any(Array),
1919
},
20-
mechanism: { type: 'auto.faas.hono.error_handler', handled: false },
20+
mechanism: { type: 'auto.http.hono.context_error', handled: false },
2121
},
2222
],
2323
},

dev-packages/node-integration-tests/suites/hono-sdk/test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ describe('hono-sdk (Node)', () => {
5757
type: 'Error',
5858
value: 'Test error from Hono app',
5959
mechanism: {
60-
type: 'auto.faas.hono.error_handler',
60+
type: 'auto.http.hono.context_error',
6161
handled: false,
6262
},
6363
},

packages/hono/src/shared/middlewareHandlers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export function responseHandler(context: Context): void {
4444

4545
if (context.error) {
4646
getClient()?.captureException(context.error, {
47-
mechanism: { handled: false, type: 'auto.faas.hono.error_handler' },
47+
mechanism: { handled: false, type: 'auto.http.hono.context_error' },
4848
});
4949
}
5050
}

0 commit comments

Comments
 (0)