Skip to content
Merged
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
3 changes: 3 additions & 0 deletions packages/sveltekit/src/worker/cloudflare.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ export function initCloudflareSentryHandle(options: CloudflareOptions): Handle {
request: event.request as Request<unknown, IncomingRequestCfProperties<unknown>>,
// @ts-expect-error This will exist in Cloudflare
context: event.platform.context,
// We don't want to capture errors here, as we want to capture them in the `sentryHandle` handler
// where we can distinguish between redirects and actual errors.
captureErrors: false,
},
() => resolve(event),
);
Expand Down
2 changes: 1 addition & 1 deletion packages/sveltekit/test/worker/cloudflare.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ describe('initCloudflareSentryHandle', () => {

expect(SentryCloudflare.wrapRequestHandler).toHaveBeenCalledTimes(1);
expect(SentryCloudflare.wrapRequestHandler).toHaveBeenCalledWith(
{ options: expect.objectContaining({ dsn: options.dsn }), request, context },
{ options: expect.objectContaining({ dsn: options.dsn }), request, context, captureErrors: false },
expect.any(Function),
);

Expand Down
Loading