Buy me a coffee! https://buymeacoffee.com/lucasbarake
Learn how to handle errors effectively in TypeScript and Effect by moving beyond the traditional "expected vs unexpected" error model. This video introduces a more practical approach to error handling through the lens of "actionable vs non-actionable" errors, demonstrating why this mental model leads to more maintainable and robust TypeScript applications.
Discover how Effect enhances TypeScript's error handling capabilities with practical examples and real-world scenarios. Whether you're building enterprise applications or personal projects, understanding this error modeling paradigm will help you write more resilient code and make better architectural decisions. Topics covered: Effect, TypeScript error handling, error modeling, type-safe error handling, functional error handling, TypeScript best practices.
00:00 Intro
00:42 Checking the Documentation: Error Management
02:05 My Philosophy: Actionable vs Non-Actionable Errors
02:48 Practical Example
06:16 Another Example: unsafe vs safe computations
07:40 Simplifying Retry Policies with Defects
10:14 Preventing Leaking Implementation Details
13:08 Effect.sync & Effect.promise: Failing is Allowed!
15:14 Traceability & Observability
16:30 Another Practical Example with Spans