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

Handle cuttlefish map errors #18

Closed
andrewjstone opened this issue Dec 9, 2014 · 2 comments
Closed

Handle cuttlefish map errors #18

andrewjstone opened this issue Dec 9, 2014 · 2 comments
Assignees
Labels

Comments

@andrewjstone
Copy link
Contributor

Seeing the following using this branch: https://github.com/basho/riak_core/tree/feature/riak-cli-handoff-enable

Andrews-MacBook-Pro:riak_ee ajs$ dev/dev1/bin/riak-admin set handoff.disable_outbound=true
Invalid Configuration: {error,[{error,"Error transforming datatype for: handoff.disable_outbound"},
                               {error,"\"true\" is not a valid enum value, acceptable values are [\"on\",\"off\"]."}]}

We should display this information in a much nicer way.

@macintux macintux self-assigned this Dec 16, 2014
@macintux
Copy link
Contributor

Cuttlefish's odd approach to error handling makes it tempting to fix that first.

For example, why this:

cuttlefish_generator:minimal_map/2 -> {error,
                                                                 transform_datatypes,
                                                                 {error,
                                                                  [{error,
                                                                    "Error transforming datatype for: handoff.disable_outbound"},
                                                                   {error,
                                                                    "\"blah\" is not a valid enum value, acceptable values are [\"on\",\"off\"]."}]}}

Versus:

{error, transform_datatypes, {bad, "blah"}, {good, ["on", "off"]}}

@andrewjstone
Copy link
Contributor Author

Fixed by #26

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

No branches or pull requests

2 participants