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

Refactor config value casting #70

Closed
2 tasks
doughsay opened this issue Jul 12, 2020 · 0 comments · Fixed by #116
Closed
2 tasks

Refactor config value casting #70

doughsay opened this issue Jul 12, 2020 · 0 comments · Fixed by #116
Labels
refactor Refactoring code or tech debt repayment

Comments

@doughsay
Copy link
Member

doughsay commented Jul 12, 2020

Originally I had the phoenix live-view responsible for casting values coming from the client, strictly requiring that all values were correct before being passed in to Config.update. This is obviously not that great... it would be much nicer if Config.update returned either :ok, or {:error, :cast_error} or something like that. This would be a nicer developer experience. As of right now, it will crash with a pattern match error, which is not ideal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Refactoring code or tech debt repayment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant