Skip to content
New issue

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

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

Already on GitHub? # to your account

Ensure FeatureHubRepository#find_interceptor returns an instance of InterceptorValue #32

Merged
merged 1 commit into from
Jan 12, 2024
Merged

Conversation

kasperite
Copy link
Contributor

Hello 👋

After registering an environment interceptor and reading a feature value, I encountered an exception #<NoMethodError: undefined method `cast' for #<FeatureHub::Sdk::EnvironmentInterceptor:0x000000010ac9c088 @enabled=true> at this line:

return intercept.cast(feature_type) if intercept
.

The bug is inFeatureHubRepository#find_interceptor as it is supposed to return an instance of InterceptorValue, not ValueInterceptor. I have updated existing spec to test real behaviour.

Gemfile.lock was outdated so I included here too.

@kasperite kasperite changed the title Ensure FeatureHubRepository#find_interceptor returns InterceptorValue Ensure FeatureHubRepository#find_interceptor returns an instance of InterceptorValue Jan 11, 2024
Copy link
Contributor

@rvowles rvowles left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good - will update the version file and release later.

@rvowles rvowles merged commit eb496ac into featurehub-io:main Jan 12, 2024
1 check passed
@rvowles
Copy link
Contributor

rvowles commented Jan 12, 2024

and released!

@kasperite
Copy link
Contributor Author

and released!

awesome, thanks @rvowles

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants