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(react): Guard against non-error obj in ErrorBoundary #6181

Merged
merged 1 commit into from Nov 10, 2022

Conversation

AbhiPrasad
Copy link
Member

fixes #6167

Although componentDidCatch is typed to accept an Error object, it can also be invoked with non-error objects. This is why we need to check if the error is an error-like object.

@AbhiPrasad AbhiPrasad requested review from a team, mydea and Lms24 and removed request for a team November 10, 2022 10:59
@github-actions
Copy link
Contributor

size-limit report 📦

Path Size
@sentry/browser - ES5 CDN Bundle (gzipped + minified) 19.5 KB (-0.01% 🔽)
@sentry/browser - ES5 CDN Bundle (minified) 60.34 KB (0%)
@sentry/browser - ES6 CDN Bundle (gzipped + minified) 18.15 KB (-0.02% 🔽)
@sentry/browser - ES6 CDN Bundle (minified) 53.69 KB (0%)
@sentry/browser - Webpack (gzipped + minified) 19.89 KB (0%)
@sentry/browser - Webpack (minified) 65.1 KB (0%)
@sentry/react - Webpack (gzipped + minified) 19.91 KB (0%)
@sentry/nextjs Client - Webpack (gzipped + minified) 46.02 KB (0%)
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified) 26.35 KB (-0.01% 🔽)
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified) 24.75 KB (-0.01% 🔽)

@AbhiPrasad AbhiPrasad merged commit fd377d6 into master Nov 10, 2022
@AbhiPrasad AbhiPrasad deleted the abhi-error-boundary-string branch November 10, 2022 12:31
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.

[React ErrorBoundary] Cannot create property 'cause' on string
2 participants