Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(sveltekit): Log error to console by default in handleErrorWithSentry #7674

Merged
merged 3 commits into from Mar 30, 2023

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 merged commit 79ca4a7 into develop Mar 30, 2023
27 checks passed
@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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants