~/talk

Avoiding Disaster: Practical Strategies for Error Handling Slides

Talkat RubyConf TH 2023 · 2023-10-06..10-07· [software-architecture]
slides:none on file

Builds a simple ticket‑purchase web flow and replaces ad hoc exception checks with a tiny Ruby pattern: service objects that return a monadic result object (success/value or failure/error), implemented via a base MonicService and concrete services like create_order and checkout_order. Controllers now inspect result.success? and render standardized error payloads instead of rescuing many exception types. Claim: this reduces branching, improves reuse and readability, and keeps expected errors explicit while reserving exceptions for truly unexpected failures.

AI-written summary · about

  1. 0:00Introduction
  2. 1:05Understanding errors
  3. 3:39Expected vs unexpected
  4. 5:26Naive error handling
  5. 9:03Refactoring business logic
  6. 12:36Inconsistent error handling
  7. 14:01Monadic error handling
  8. 17:12Service objects with monadic results
  9. 20:48When to use monads
  10. 23:19Validity and execution errors
  11. 24:24Summary
~/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.