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

Do not return error from Client constructor #204

Merged
merged 1 commit into from
Apr 20, 2022
Merged

Conversation

bufdev
Copy link
Member

@bufdev bufdev commented Apr 20, 2022

Per discussion. While returning an error from NewClient does make a lot of sense to do some preflight validation, it's painful to use in a lot of cases, and we can just effectively do the validation before the first call. All errors that come up in practice are things you find within seconds of using the Client for the first time, and you fix once, and never hit again. On balance, this seems like a good tradeoff.

I am not in love with the propagation of the err field.

Copy link
Member

@akshayjshah akshayjshah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

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.

3 participants