Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use left instead of fail internally #51

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/trailblazer/finder/activities/prepare_entity.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def set_entity(ctx, config:, **)
end

step :validate_entity
fail :invalid_entity_error
left :invalid_entity_error
step :set_entity
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/trailblazer/finder/activities/prepare_filters.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def set_filters(ctx, config:, **)
end

step :validate_filters
fail :invalid_filters_error
left :invalid_filters_error
step :set_filters
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/trailblazer/finder/activities/prepare_params.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def set_params(ctx, **)
end

step :validate_params
fail :invalid_params_error
left :invalid_params_error
step :set_params
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/trailblazer/finder/activities/prepare_properties.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def set_properties(ctx, config:, **)

step :check_property_types
step :validate_property_types
fail :invalid_properties_error
left :invalid_properties_error
step :set_properties
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/trailblazer/finder/activities/process_adapters.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def invalid_paginator_handler(_e, (ctx, _flow_options), **)
step :set_adapter, fast_track: true
step Rescue(Dry::Types::ConstraintError, handler: :invalid_paginator_handler) {
step :set_paginator
fail :invalid_paginator_error
left :invalid_paginator_error
}
end
end
Expand Down
1 change: 1 addition & 0 deletions trailblazer-finder.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Gem::Specification.new do |spec|
spec.add_dependency "dry-types", ">= 1.0.0"
spec.add_dependency "trailblazer-macro", ">= 2.1.15"
spec.add_dependency "trailblazer-activity", ">= 0.13.0"
spec.add_dependency "trailblazer-activity-dsl-linear", ">= 1.2.5"
spec.add_dependency "zeitwerk", ">= 2.6.0"

spec.add_development_dependency "activerecord"
Expand Down
Loading