Skip to content

Improve error handling and presentation #7

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

xclydes
Copy link

@xclydes xclydes commented Nov 14, 2021

These changes address the scenarios where:-

  1. The request throws and IOException due to a read timeout. i.e. The response from the server took 20 seconds (the default timeout).
  2. The server response with a non 2xx header and the request throws a HttpResponseException. The exception thrown is an extension of the IOException class and results in the details getting lost.

The changes to OAuthClient.java allows a custom initializer to be set by external classes, which in turn can specify a custom timeout.

The changes toUpworkRestClient.java are to change the non 2xx behaviour on the request and correct a cast error that was thrown whenever genError(HttpResponse response) was called.

@sageerify
Copy link

wow

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.

2 participants