~/talk

Ruby on Fails: effective error handling with...

Talkat RailsConf 2024 · 2024-05-07..05-09· [ruby-on-rails]
slides:none on file

Avoid rescuing rescue from exception or using raises as control flow; create specific error classes that inherit StandardError (example: CheckoutServiceError and item-specific errors) and re-raise gem/AR errors as service-level errors. Subscribe a single error reporter to Rails’ global subscriber and call report_error from an included module so controllers, jobs (Sidekiq) and the app surface consistent metadata. Keep Result/monad patterns inside use-case services only; conventions emit JSON-ready errors for safe defaults.

AI-written summary · about

  1. 0:00Effective error handling intro
  2. 1:02Ruby exceptions and errors
  3. 2:26Error handling anti-patterns
  4. 5:36Goals for error handling
  5. 7:00Discovering error scenarios
  6. 8:21Explicit error classes
  7. 10:49Avoiding leaky error handling
  8. 13:59Polymorphic error handling
  9. 17:10Centralized error strategy
  10. 23:27Rails error handling
  11. 27:00Flow strategies in use cases
  12. 28:23Key takeaways
~/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.