When credentials are wrong, we received : java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $ We should check the status code and return more comprehensible exception through the API.