getsentry / sentry-javascript

Official Sentry SDKs for JavaScript
https://sentry.io
MIT License
7.68k stars 1.49k forks source link

feat(react): type error as unknown in ErrorBoundary #11819

Closed AbhiPrasad closed 3 weeks ago

AbhiPrasad commented 3 weeks ago

Fixes https://github.com/getsentry/sentry-javascript/issues/11728

As reporting in the above issue, it is not typesafe to type the error thrown by react components as Error, it can actually be any JS object/primitive that was thrown. This means we have to type everything as unknown.

This change only will happen for 8.x because it's a breaking change.

Related: