Skip to content
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

Failing to register controllers does not bubble the error to handleError #102

Open
crohr opened this issue Jun 28, 2022 · 1 comment
Open

Comments

@crohr
Copy link

crohr commented Jun 28, 2022

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.)

Is it by design, or are you open to a fix?

.catch(error => console.error(`Failed to register controller: ${name} (${path})`, error))

@dhh
Copy link
Member

dhh commented Jul 15, 2022

Not by design. Would be good with a fix 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants