Skip to content

Conversation

@Lms24
Copy link
Member

@Lms24 Lms24 commented Mar 30, 2023

Previously, our handleErrorWithSentry wrapper did nothing if users didn't provide a custom error handler as an argument. While IMO it's good that the error handler is an optional parameter, this swallowed errors and didn't log them to the console anymore.

This PR fixes that by adding a default error handler which our wrapper invokes if no custom handler was provided. The client- and server default handlers log the error to the console, exactly like the default handlers by SvelteKit (client, server).

@Lms24 Lms24 self-assigned this Mar 30, 2023
@Lms24 Lms24 requested a review from AbhiPrasad March 30, 2023 13:52
@Lms24 Lms24 added the Package: sveltekit Issues related to the Sentry SvelteKit SDK label Mar 30, 2023
@Lms24 Lms24 merged commit 79ca4a7 into develop Mar 30, 2023
@Lms24 Lms24 deleted the lms/sveltekit-fix-errorhandler-log-swallowed branch March 30, 2023 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Package: sveltekit Issues related to the Sentry SvelteKit SDK

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants