Skip to content

Error reporting event#357

Closed
tomwaddington wants to merge 2 commits intohotwired:mainfrom
tomwaddington:error-reporting-event
Closed

Error reporting event#357
tomwaddington wants to merge 2 commits intohotwired:mainfrom
tomwaddington:error-reporting-event

Conversation

@tomwaddington
Copy link
Copy Markdown

@tomwaddington tomwaddington commented Aug 27, 2021

Rather than just emitting any errors to the console, we can emit them as turbo:error CustomEvents, allowing the application developer to monitor and raise these to any exception trackers.

I think this would make migration to Turbo easier, see #336.

I'd appreciate a quick 👀 on this approach, and then I'd be happy to update the PR with some tests.

@dhh
Copy link
Copy Markdown
Member

dhh commented Aug 27, 2021

This is great. Please do wrap it up and we'll sneak it in before 7.0 final 👍

}

export function reportError(error) {
console.warn(error)
Copy link
Copy Markdown

@gobijan gobijan Sep 2, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't be this console.error to stay true to the method name and the old functionality?

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants