Whenever a controller fails to register (for instance if a targetNameConnected() method throws an error), stimulus will catch the error and display a console message. However that means we can never be alerted of that error, because it doesn't bubble the error to application.handleError, which I believe is the hook point to setup exception monitoring (appsignal, etc.)
Whenever a controller fails to register (for instance if a
targetNameConnected()
method throws an error), stimulus will catch the error and display a console message. However that means we can never be alerted of that error, because it doesn't bubble the error toapplication.handleError
, which I believe is the hook point to setup exception monitoring (appsignal, etc.)Is it by design, or are you open to a fix?
https://github.com/hotwired/stimulus-rails/blob/7e0150bc2f30f8443c8bfdbfdd508c2eea4427e7/app/assets/javascripts/stimulus-loading.js#L27