-
Notifications
You must be signed in to change notification settings - Fork 13
Update http client and improve error handling #23
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
Conversation
jhamon
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general I like the direction, OkHttpClient seems quite nice. But I do think we need some more iteration on this before merging (see comments below). I'm going to mark this as "Approve" so you can not be blocked while we're out of town if you make the requested changes and feel confident merging. But if you want another round of reviews, let us know.
jhamon
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left a few more suggestions, but overall it's looking great. Nice work.
austin-denoble
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work here swapping out AsyncHttpClient for OkHttpClient. Really appreciate your attention to detail and improving our error handling. 🎉
Problem
The java sdk currently relies on AsyncHttpClient but keeping the long term goal in mind, will like to replace it with OkHttpClient. Also the errors raised are not clear enough for the users.
Solution
Replaced OkHttpClient for create and delete index functionalities. Also added httpErrorMapper which will provide details on why the exception occurred rather than throwing a high level IOException.
Type of Change
This is neither a bug fix nor a new feature but knowing that in future we'll like to rely on OkHttpClient, it is best to replace it now before implementing rest of the control plane operations.
Test Plan
Added unit tests and ran integration locally to make sure the client works as it used to before and is backwards compatible.