-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
getsentry/sentry-docs
#8925Labels
Description
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/react
SDK Version
7.94.1
Framework Version
17.0.2
Link to Sentry event
No response
SDK Setup
Sentry.init({
dsn: '[OMMITTED]',
environment: process.env.NODE_ENV,
autoSessionTracking: false,
beforeSend(event) {
if (process.env.NODE_ENV === 'production') {
// Determine if our error handler dealt with this
const handled =
event.contexts && event.contexts[sentryErrorHandledProperty];
if (!handled) {
const opts: NewReportDialogOptions = { eventId: event.event_id };
Sentry.showReportDialog(opts);
}
return event;
}
return null;
},
});Steps to Reproduce
- Try to use the Sentry.showReportDialog() anywhere, passing the newly-recommended
{eventId: string}options object. - See that the deprecated warning does not go away.
- If you try to enforce the typing so that TS knows you're trying to call the new overload of the method, you will get a compiler error because the new type is not exported, e.g.:
Sentry.showReportDialog({ eventId: event.event_id } as NewReportDialogOptions); // Red squigglies here ^
Expected Result
I should be able to remove the deprecation warning.
Actual Result
Metadata
Metadata
Assignees
Labels
Projects
Status
Waiting for: Product Owner
