-
Notifications
You must be signed in to change notification settings - Fork 29
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
Misleading ServiceActor::ArgumentError
message under specific circumstances
#131
Comments
Oh indeed. Right now the options only make sense to inputs as they are checked on I’d be tempted to raise an error on any option passed to Or we could make sure they actually work, but that would mean doing the check on the |
I'd prefer to make it working, it seems to be quite useful |
Happy to accept a PR to make Actually instead of on the |
Hm, It seems like I misunderstood you. The following actor # frozen_string_literal: true
class AddGreetingWithDefault < Actor
input :name, default: "world", type: String
output :greeting, type: String
def call
self.greeting = 1
end
end works quite good, it throws
|
It seels like the probelm is hardcoded
which should be replaced with |
Yes! My bad, I’ve misunderstood the issue. I forgot that checks actually worked on outputs, I just never used them 🙈 I think the |
Just to make sure I got you correctly, current behavior of class WithUnsetOutput < Actor
output :value, type: String, allow_nil: true
end is
And if we skep default_check on outputs we'd expect it to complete successfuly with |
Yeah, I think that would make sense. |
Given the following actor
Evaluating
TestActor.call(value: 1)
leads to(note the "input" while
value_result
is defined as output)It does not happen if you define output without
allow_nil: true
The text was updated successfully, but these errors were encountered: