Skip to content
Permalink
Browse files
update javadoc following PR review
  • Loading branch information
ahgittin committed May 9, 2017
1 parent 51c05d8 commit cf15eb429e1130f031ce7facd57c8c54259e151c
Showing 1 changed file with 3 additions and 2 deletions.
@@ -405,8 +405,9 @@ public static <T> T getEntityOnSuccess(Response response, Class<T> type) {
return getEntity(response, type);
}

/** This fails if it is clearly an ApiError response which the caller did not want.
* To fail on any error (probably better), use */
/** Fails if the response is clearly an ApiError response which the caller did not want.
* To fail on any error (probably better), callers will normally use the {@link #getEntityOnSuccess(Response, Class)} method,
* or {@link #getEntity(Response, Class)} if preferring to ignore errors. */
private static <T> void failSomeErrors(Response response, Class<?> type, boolean onlyIfItLooksLikeApiError) {
if (response.getStatus()<400) {
// not an error

0 comments on commit cf15eb4

Please sign in to comment.