This is a feature request to enable the reporting of errors that occur in the context of a jQuery Deferred but are otherwise unhandled (do not trigger window.onerror). For example:
// Simulated client error logger. window.onerror = console.log // Test that client error logger is invoked. (It is!) $(() => {throw new Error}) const d = $.Deferred(); d.then(() => { console.log('Throwing...') throw new Error console.log('Never reached here!') }).then( () => console.log('Never reached here either and the error is unhandled!') ) d.resolve()
These sorts of errors should be reported distinctly from those that occur outside of Deferred and that are handled by window.onerror since there may be _many_ and require lots of error handler updates. Regardless, we should be able to at least easily detect quickly whether or not a deployment causes a spike in all errors.
Related: T226986