Closed
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/ember
SDK Version
9.27.0
Framework Version
ember 6.5.0
Link to Sentry event
No response
Reproduction Example/SDK Setup
See current usage of global Ember import here:
And usage of Ember.onerror
here:
Steps to Reproduce
- Go here https://deprecations.emberjs.com/id/deprecate-import-onerror-from-ember and see that importing global Ember is deprecated, and that there is no replacement for Ember.onerror
The usage of Ember.onerror has been discourged for a while, and not been in the docs since Ember v5.8 (May 15, 2024)
The current docs is to simply add an event listener to the 'error' event on window:
import fetch from 'fetch';
// ...
window.addEventListener('error', function(error) {
fetch('/error-notification', {
method: 'POST',
body: JSON.stringify({
stack: error.stack,
otherInformation: 'exception message'
})
});
});
Expected Result
No imports from global Ember
, specifically Ember.onerror
since that is the only one used by Sentry. I guess having an event listener on the 'error' event is already handled by sentry, so the special logic for Ember.onerror
can simply be removed, I think.
Actual Result
See reproduction.
Metadata
Metadata
Assignees
Type
Projects
Status
No status