Created
September 2, 2024 14:50
-
-
Save dunkrupp/b2f229417a19ea639958b4b341f51824 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# frozen_string_literal: true | |
class BaseOperation | |
include Callee | |
include Dry::Monads[:do, :result] | |
private | |
def capture_and_fail(message, exception) | |
Rails.logger.error(exception.message) | |
Failure(message) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment