~/talk

Have You Heard the Joke About Async Debugging? I Promise It Is Good

Talkat revo.js 2023 · 2023-10-04..10-06· [javascript, testing]
github:jayphelps
slides:none on file

Most apps contain subtle async bugs: HTTP responses arrive out of order, causing stale search results; fix shown by canceling prior fetches with AbortController/AbortSignal and checking error.name === AbortError instead of swallowing exceptions. Another common bug is silent failures from automatic promise flattening — returning a Promise from an async function can bypass try/catch unless code uses return await (or an ESLint rule). Debugging relies on network waterfalls, DevTools async stacks, and targeted console logs.

AI-written summary · about

  1. 0:00Introduction
  2. 1:03Async bugs are everywhere
  3. 2:49Simple search example
  4. 4:11The async bug revealed
  5. 6:58Fixing with AbortController
  6. 9:25Handling abort exceptions
  7. 11:34Promise flattening trap
  8. 13:59Why try-catch fails
  9. 16:50Promise flattening explained
  10. 18:55Never rely on flattening
  11. 20:01Key takeaways
  12. 21:45Debugging async code
~/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.