Open
Description
WIP: https://github.com/VulcanJS/Vulcan/tree/errors
Things to note compared to @ErikDakoda's original code:
- I changed the
debug
,info
, etc. shortcut functions so that they have the same signature as the mainlog
function (they accept a singleparams
object). - For now I commented out everything I wasn't using, we can re-enable the code progressively.
- I created a new
ErrorCatcher
component that you can use as an error boundary to wrap your component tree (typically in yourLayout
component) and catch any errors. - I am not sure if
ErrorsUserMonitor
is still useful or if the functionality of monitoring user change should just be merged intoErrorCatcher
. Or maybe even integrated withvulcan:events
somehow via a globaluser.changed
callback.
Overall it seems to work, I've got Sentry reporting server-side and client-side errors. I still need to look into some things though, such as identifying the current user; and how to handle document not found and permission errors (differentiate them by tag? log level?).