Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
waiting-for-dev committed Oct 29, 2024
1 parent e601705 commit 9718608
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions docsite/source/error-handling.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ title: Error Handling
layout: gem-single
name: dry-operation
---

When using `dry-operation`, errors are handled through the `Failure` type from [`dry-monads`](/gems/dry-monads/). Each step in your operation should return either a `Success` or `Failure` result. When a step returns a `Failure`, the operation short-circuits, skipping the remaining steps and returning the failure immediately.

You'll usually handle the failure from the call site, where you can pattern match on the result to handle success and failure cases. However, sometimes it's useful to encapsulate some error handling logic within the operation itself.
Expand Down

0 comments on commit 9718608

Please sign in to comment.