~/talk

Error handling: doing it right!

Talkat HolyJS Piter 2019 · 2019-05-24..05-25· [nodejs, security]
slides:none on file

Covers concrete traps and fixes: throwing primitives loses stacks, promise constructors can swallow errors or double-resolve, unawaited async returns create unhandled rejections, and callbacks-without-errors hide failures. Shows tools and results: using util.promisify, checking promise hooks, enabling --unhandled-rejections=strict to turn warnings into crashes, and Node 12’s zero-cost async stack traces that surface real call sites. Demonstrates practical patterns: layered error classes, Express/fasthttp error handlers, and a retry strategy (backoff up to ten tries) for flaky outgoing APIs.

AI-written summary · about

  1. 0:00Start
  2. 2:25Callbacks
  3. 28:53Why Do I Use Assert
  4. 29:37The Error Classes
  5. 31:03Abstract Error Modules
  6. 32:34Generic Error Handler for Express
  7. 36:01Databases
  8. 40:42Multiple Resource
  9. 47:02Summary
  10. 47:53Abstract Error Classes
  11. 50:33What Is the Best Way To Refactor Thralls in Promises To Cancel Them To Cancel Them
~/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.