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

Use something else than :error keyword in the result map to indicate success #90

Open
mikub opened this issue Oct 26, 2017 · 0 comments

Comments

@mikub
Copy link

mikub commented Oct 26, 2017

Logically, {:error :SUCCESS} seems a bit confusing. If a method returns a result map, one would expect that e.g. if (contains? r :error) resolves to true it would be indicative of an error. Similarly, (:error result) is always true here, even if everything worked out well. This seems a bit counter-intuitive.
Imho, {:error :SUCCESS} is an oxymoron, so I would argue to use something more self-explanatory, e.g. :result :SUCCESS should be used - I would expect :error keyword to be present in a map and to have a non-nil value only in case of an error.

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

1 participant