Skip to content

ref(core): Don't set this.name to new.target.prototype.constructor.name on SentryError class #15216

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

Merged
merged 1 commit into from
Jan 29, 2025

Conversation

mydea
Copy link
Member

@mydea mydea commented Jan 29, 2025

We did some funky stuff in there that does not seem necessary and can even lead to issues.

Fixes #15214.

There was this comment in there:

// This sets the prototype to be `Error`, not `SentryError`. It's unclear why we do this, but commenting this line
// out causes various (seemingly totally unrelated) playwright tests consistently time out.

but it seems all tests are passing, so should be good I suppose...

@mydea mydea self-assigned this Jan 29, 2025
Copy link
Contributor

github-actions bot commented Jan 29, 2025

size-limit report 📦

⚠️ Warning: Base artifact is not the latest one, because the latest workflow run is not done yet. This may lead to incorrect results. Try to re-run all tests to get up to date results.

Path Size % Change Change
@sentry/browser 23.04 KB -0.09% -21 B 🔽
@sentry/browser - with treeshaking flags 22.93 KB -0.1% -22 B 🔽
@sentry/browser (incl. Tracing) 35.77 KB -0.05% -18 B 🔽
@sentry/browser (incl. Tracing, Replay) 72.55 KB -0.04% -23 B 🔽
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 66.11 KB -0.03% -17 B 🔽
@sentry/browser (incl. Tracing, Replay with Canvas) 76.81 KB -0.03% -22 B 🔽
@sentry/browser (incl. Tracing, Replay, Feedback) 89.3 KB -0.03% -19 B 🔽
@sentry/browser (incl. Feedback) 39.72 KB -0.06% -21 B 🔽
@sentry/browser (incl. sendFeedback) 27.67 KB -0.07% -19 B 🔽
@sentry/browser (incl. FeedbackAsync) 32.45 KB -0.07% -20 B 🔽
@sentry/react 25.71 KB -0.1% -24 B 🔽
@sentry/react (incl. Tracing) 38.53 KB -0.08% -29 B 🔽
@sentry/vue 27.14 KB -0.07% -18 B 🔽
@sentry/vue (incl. Tracing) 37.49 KB -0.06% -21 B 🔽
@sentry/svelte 23.16 KB -0.11% -24 B 🔽
CDN Bundle 24.24 KB -0.13% -31 B 🔽
CDN Bundle (incl. Tracing) 35.9 KB -0.05% -18 B 🔽
CDN Bundle (incl. Tracing, Replay) 70.52 KB -0.03% -20 B 🔽
CDN Bundle (incl. Tracing, Replay, Feedback) 75.65 KB -0.03% -22 B 🔽
CDN Bundle - uncompressed 70.85 KB -0.14% -97 B 🔽
CDN Bundle (incl. Tracing) - uncompressed 106.48 KB -0.09% -97 B 🔽
CDN Bundle (incl. Tracing, Replay) - uncompressed 217.34 KB -0.05% -97 B 🔽
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 229.9 KB -0.05% -97 B 🔽
@sentry/nextjs (client) 38.63 KB -0.09% -33 B 🔽
@sentry/sveltekit (client) 36.28 KB -0.06% -22 B 🔽
@sentry/node 156.36 KB -0.02% -29 B 🔽
@sentry/node - without tracing 97.45 KB -0.04% -31 B 🔽
@sentry/aws-serverless 106.92 KB -0.03% -23 B 🔽

View base workflow run

@mydea mydea marked this pull request as ready for review January 29, 2025 12:21
@mydea mydea requested review from lforst and Lms24 January 29, 2025 12:21
@lforst lforst changed the title ref(core): Streamline SentryError class ref(core): Don't set this.name to new.target.prototype.constructor.name on SentryError class Jan 29, 2025
@lforst
Copy link
Contributor

lforst commented Jan 29, 2025

mega sus code

We did some funky stuff in there that does not seem necessary and can even lead to issues.

Fixes #15214.
@mydea mydea force-pushed the fn/streamline-sentryError branch from b9143ce to 26ae6b4 Compare January 29, 2025 13:35
@mydea mydea merged commit d34e03f into develop Jan 29, 2025
143 checks passed
@mydea mydea deleted the fn/streamline-sentryError branch January 29, 2025 13:51
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.

SentryError constructor fail with a TypeError if Object/Error prototype has been frozen
2 participants