~/talk

Getting the Most out of JavaScript Errors

Talkat Node+JS Interactive 2019 · 2019-12-11..12-12· [javascript, observability]
slides:none on file

Explains that Error.stack is generated when an Error is instantiated, not when thrown, so rethrowing the same Error preserves the original trace while creating a new Error loses root context; shows how to copy original stack onto a custom Error and how to synthesize a trace by creating an Error when catching non‑Error throws. Notes async gaps (Node 12 and async/await give better async stacks; Chrome devtools show extra frames but Error.stack often doesn’t), warns against throwing primitives, details Script error due to cross-origin and the fix: add crossorigin="anonymous" plus Access-Control-Allow-Origin. Recommends using Sentry for collection.

AI-written summary · about

  1. 0:00Introduction to JavaScript errors
  2. 2:25Error object basics
  3. 5:35Creating custom errors
  4. 7:00Stack traces explained
  5. 9:50Async stack traces limitations
  6. 12:47Non-standard stack properties
  7. 14:31Throwing non-error objects
  8. 17:21Synthetic error traces
  9. 18:43Reporting errors globally
  10. 21:58Browser error handlers
  11. 23:02Cross-origin script errors
  12. 25:31Key takeaways summary
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.