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(nextjs): Add default option to OnUncaughtException integration #6142

Closed
wants to merge 1 commit into from

Conversation

lforst
Copy link
Member

@lforst lforst commented Nov 7, 2022

As @lobsterkatie mentioned in #6138 (comment) we should properly address what happens if users modify the OnUncaughtException integration.

@lobsterkatie
Copy link
Member

Thanks for running with my comment!

Two things I notice here:

  • In the case in which a user either provides an integrations array which includes an instance of onUncaughtException or provides a function which returns such an array, this will work, because it will update that instance with the new option. In all other cases, however, the fact that there won't be an onUncaughtException instance in options.integrations when those options are passed to nodeInit means that the default instance (without the new option set) will end up being included. If we want the integration to exist with the new option, we have to add it at the addOrUpdateIntegration stage.

  • I think we can do this a lot more simply, without having to duplicate most of the code in addOrUpdateIntegration.

I gave it a go in #6148.

@lobsterkatie
Copy link
Member

Closed in favor of #6148.

@lforst lforst deleted the lforst-fix-default-options branch January 16, 2023 16:32
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.

None yet

2 participants