-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
fix(browser): log ErrorEvent.message when unhandled ErrorEvent.error is null
#9322
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
fix(browser): log ErrorEvent.message when unhandled ErrorEvent.error is null
#9322
Conversation
✅ Deploy Preview for vitest-dev ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
ErrorEvent.messageErrorEvent.message when ErrorEvent.error is null
@vitest/browser
@vitest/browser-playwright
@vitest/browser-preview
@vitest/browser-webdriverio
@vitest/coverage-istanbul
@vitest/coverage-v8
@vitest/expect
@vitest/mocker
@vitest/pretty-format
@vitest/runner
@vitest/snapshot
@vitest/spy
@vitest/ui
@vitest/utils
vitest
@vitest/web-worker
@vitest/ws-client
commit: |
ErrorEvent.message when ErrorEvent.error is nullErrorEvent.message when unhandled ErrorEvent.error is null
| } | ||
| else { | ||
| console.error(e[prop]) | ||
| // `ErrorEvent` doesn't necessary have `ErrotEvent.error` defined |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| // `ErrorEvent` doesn't necessary have `ErrotEvent.error` defined | |
| // `ErrorEvent` doesn't necessary have `ErrorEvent.error` defined |
| { browser: 'firefox' }, | ||
| { browser: 'webkit' }, | ||
| // hard to webkit on some linux distributions | ||
| ...(process.env.BROWSER_NO_WEBKIT ? [] : [{ browser: 'webkit' as const }]), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see this being set anywhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is for me to run test locally by BROWSER_NO_WEBKIT=1 pnpm -C test/browser ... commands as I cannot setup playwright on Archlinux.
Description
Resolves #9285
This PR surfaces
ErrorEvent.messageon console, but notably this still keeps them as non unhandled errors.Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
pnpm-lock.yamlunless you introduce a new test example.Tests
pnpm test:ci.Documentation
pnpm run docscommand.Changesets
feat:,fix:,perf:,docs:, orchore:.