Some of the operations are more complex, and I separate "params" validation from model and external validations, something like this:
perform do validate :schema tee_try :validate_resource_status, catch: Errors::UnprocessableEntity map :extract_date map :compute_period try :get_available_members, catch: Errors::UnprocessableEntity tee :update map :decorate end
In this case,
:get_available_members could raise an UnprocessableEntity error that would be handled back in the controller, I separated those ones from the main
schema because the logic on those cases are not directly related to the input. But for most cases I'll have a single
:schema that will validate the input, followed by a
:persist or something.