~/lightning

Modeling errors in Now CLI

Lightningat React Alicante 2018 · on Friday, 2018-09-14· [developer-experience, nodejs]
slides:none on file

Argues for modeling errors end-to-end in Now CLI by turning API error payloads into typed local errors, wrapping fetch to throw an API error object, and converting that into richer CLI-specific constructors so createAlias can pattern-match on a missing-domain case and suggest exact remediation. Demonstrates using subclasses of Error, a HOF wrapper, and Flow-style union return types to force handling across ~100 microservices and across async boundaries so unexpected 500s become actionable, specific responses.

AI-written summary · about

  1. 0:00Start
  2. 0:13undefined is not a function
  3. 2:07unknown error space
  4. 4:26what's the entry?
  5. 13:59throw vs return
  6. 14:51what are the errors a function can throw?
~/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.