- 
                Notifications
    You must be signed in to change notification settings 
- Fork 46.1k
fix(frontend): Prevent errors in Sentry LaunchDarkly flag handler from breaking the app #11218
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
base: dev
Are you sure you want to change the base?
Conversation
| ✅ Deploy Preview for auto-gpt-docs canceled.
 | 
| This PR targets the  Automatically setting the base branch to  | 
| Here's the code health analysis summary for commits  Analysis Summary
 
 | 
| Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the  You can disable this status message by setting the  Comment  | 
| This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request. | 
| Thanks for this PR to fix the Sentry LaunchDarkly integration issue. A couple of items need attention before this can be merged: 
 Once these items are addressed, the PR should be ready for review again. | 
| Thank you for this PR to fix the Sentry LaunchDarkly flag handler issue! The changes look good overall, with a clear defensive programming approach to prevent errors from breaking the application. A couple of notes: 
 Otherwise, the approach of creating a defensive wrapper around the Sentry LaunchDarkly flag handler is a solid fix for this issue. | 
| Conflicts have been resolved! 🎉 A maintainer will review the pull request shortly. | 
| if is_configured(): | ||
| integrations.append(LaunchDarklyIntegration(get_client())) | ||
| # if is_configured(): | ||
| # integrations.append(LaunchDarklyIntegration(get_client())) | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes 🏗️
Fixes BUILDER-496. The issue was that: Sentry's LaunchDarkly integration failed to validate
_urltype before callingindexOf, causing aTypeError.@sentry/nextjsfrom10.15.0to10.20.0.createSafeLaunchDarklyFlagHandlerfunction that attempts to build the Sentry handler and wraps it in a try-catch block. If building the handler or executing it results in an error, the error is logged to the console, but the error is prevented from propagating and breaking the application.This fix was generated by Seer in Sentry, triggered automatically. 👁️ Run ID: 2067983
Not quite right? Click here to continue debugging with Seer.
Checklist 📋
For code changes:
Example test plan
For configuration changes:
.env.defaultis updated or already compatible with my changesdocker-compose.ymlis updated or already compatible with my changesExamples of configuration changes