Skip to content

Commit

Permalink
Make on_failure private
Browse files Browse the repository at this point in the history
  • Loading branch information
timriley committed Oct 30, 2024
1 parent 2ad17a8 commit d69c504
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docsite/source/error-handling.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ class CreateUser < Dry::Operation
user
end

private

def on_failure(failure)
# Log or handle the failure globally
logger.error("Operation failed: #{failure}")
Expand All @@ -47,6 +49,8 @@ class CreateUser < Dry::Operation
user
end

private

def on_failure(failure, step_name)
case step_name
when :validate
Expand Down

0 comments on commit d69c504

Please sign in to comment.