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

on_error is inconsistent with analytics-ruby #31

Open
ojab opened this issue Dec 17, 2020 · 2 comments
Open

on_error is inconsistent with analytics-ruby #31

ojab opened this issue Dec 17, 2020 · 2 comments

Comments

@ojab
Copy link

ojab commented Dec 17, 2020

analiytics-ruby passes two arguments, while simple_segment passes four, so on_error: ->(status, message) {} doesn't work.

@whatthewhat
Copy link
Owner

whatthewhat commented Dec 22, 2020

Hey @ojab, thanks for submitting this!
You are correct, this is not backwards-compatible with analytics-ruby. I still feel reluctant about changing the signature to 2 arguments, since at this point this would be a breaking change for this gem 🤔

I'll leave this issue open and might change to a 2-argument on_error in a future 2.x release.

@ojab
Copy link
Author

ojab commented Dec 22, 2020

Sure, it's probably easier to change it to 4 argument in analytics-ruby with backward-compatible way. I'm planning to finish some backlog on NY holidays and make/submit some PRs, I'll try to include this.
And if it would be NAKed — we could do this in backward-compatible way in simple_segment by checking error_handler.arity.

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

No branches or pull requests

2 participants