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(remix): Use captureRemixServerException inside handleError. #466

Merged
merged 3 commits into from
Sep 26, 2023

Conversation

onurtemizkan
Copy link
Collaborator

@onurtemizkan onurtemizkan commented Sep 21, 2023

Fixed Remix v2's handleError template, that was mistakenly invoking Sentry.captureRemixErrorBoundaryError

Replaced it with Sentry.captureRemixServerException

And as it's optional, removed manual handling of non-error capturing from the template.

@onurtemizkan onurtemizkan marked this pull request as draft September 21, 2023 14:49
@onurtemizkan onurtemizkan marked this pull request as ready for review September 21, 2023 15:06
@AbhiPrasad AbhiPrasad requested a review from Lms24 September 21, 2023 15:36
@AbhiPrasad AbhiPrasad merged commit 0231cd3 into master Sep 26, 2023
@AbhiPrasad AbhiPrasad deleted the onur/fix-handleError-template branch September 26, 2023 18:42
Sentry.captureException(error);
}
export const HANDLE_ERROR_TEMPLATE_V2 = `function handleError(error, { request }) {
Sentry.captureRemixServerException(error, 'remix.server', { request });

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@onurtemizkan @AbhiPrasad

this won't work;

needs to be:
Sentry.captureRemixServerException(error, 'remix.server', request);

without { } around request

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for reporting @wilcoschoneveld! Opened a fix PR. #469

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants