julianrubisch / better-stimulus

An opinionated collection of StimulusJS best practices
https://www.betterstimulus.com
272 stars 16 forks source link

global-error-handler.md seems to unnecessary/outdated for Stimulus 3.x #96

Open tmaier opened 1 year ago

tmaier commented 1 year ago

https://www.betterstimulus.com/error_handling/global-error-handler states an approach how to enable global error handling.

In 2021, following improvements landed in Stimulus: https://github.com/hotwired/stimulus/pull/365

Based on this, the approach how to enable error handling, has been documented officially at https://stimulus.hotwired.dev/handbook/installing#error-handling. It states, that it supports window.onerror, which is being used by most error handlers, like Sentry.

This meas, the current approach is not really necessary anymore.