I started to comment on the initial PR but found it easier finally to open a new PR on yours as I wanted to suggest several significant changes.
I expanded the solution description and mostly explaining more in detail the role of the newly defined errorHandler function within the ApplicationController
I removed most of this part:
Stimulus includes a largely undocumented global error handler (see links below) that catches errors when Stimulus invokes your application code in internal try/catch blocks.
as it is not as magic as that but only a result of the newly defined errorHandler function in the ApplicationController
move to a dedicated section the configuration of the reporting service
Basically the idea is lets make sure we collect all the issues in the same place and format them correctly. Then once we have this single point let's dispatch this source to a dedicated service.
Hey
I started to comment on the initial PR but found it easier finally to open a new PR on yours as I wanted to suggest several significant changes.
I expanded the solution description and mostly explaining more in detail the role of the newly defined
errorHandler
function within theApplicationController
I removed most of this part:
as it is not as magic as that but only a result of the newly defined
errorHandler
function in theApplicationController
Basically the idea is lets make sure we collect all the issues in the same place and format them correctly. Then once we have this single point let's dispatch this source to a dedicated service.
Feel free to comment/edit etc