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

Return :error as first element of tuple instead of :fail #4

Merged
merged 1 commit into from
Nov 10, 2015

Conversation

mrdziuban
Copy link
Contributor

This updates ExRated.check_rate/3 to return {:error, limit} when the rate limit is exceeded, rather than {:fail, limit}. Using :error as the first key of a returned tuple seems to be a pretty standard Elixir pattern, and it will make it easier to integrate ex_rated with other libraries, like MonadEx.

If you're using SemVer, this might require a major version bump (i.e. 1.0.0) since this change is not backwards compatible.

grempe added a commit that referenced this pull request Nov 10, 2015
Return :error as first element of tuple instead of :fail
@grempe grempe merged commit aab7335 into grempe:master Nov 10, 2015
@grempe
Copy link
Owner

grempe commented Nov 10, 2015

Pushed in newly released version 1.0.0. Thanks for the pull request.

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

Successfully merging this pull request may close these issues.

2 participants