-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Document reportError as an option for reporting in browsers #13547
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
Comments
Seems like a good idea, but Just putting this here for reference: https://developer.mozilla.org/en-US/docs/Web/API/reportError However, we should verify the behavior of using this in an integration test. It could be that it just bubbles up and works OOTB. |
I believe it works out of the box and from Sentry's perspective it is just an unhandled error event. |
Yeah, we will add an integration test for this 👍 |
Problem Statement
I think the global
reportError
function could be an idiomatic way to report errors to Sentry from JavaScript, if it is not too general for your use case. I don't find much talk about this function on the webs, but it has been available across major browsers for some time.Solution Brainstorm
The Capturing Errors and Events page of the docs could have a small section that mentions
reportError
as an alternative.The text was updated successfully, but these errors were encountered: