diff --git a/auth0/src/main/java/com/auth0/android/request/internal/SimpleRequest.java b/auth0/src/main/java/com/auth0/android/request/internal/SimpleRequest.java index 794b0d41f..f02cb823b 100755 --- a/auth0/src/main/java/com/auth0/android/request/internal/SimpleRequest.java +++ b/auth0/src/main/java/com/auth0/android/request/internal/SimpleRequest.java @@ -88,9 +88,9 @@ public void onResponse(Response response) { @Override protected Request doBuildRequest() throws RequestBodyBuildException { - boolean sendBody = method.equals("HEAD") || method.equals("GET"); + boolean skipBody = method.equals("HEAD") || method.equals("GET"); return newBuilder() - .method(method, sendBody ? null : buildBody()) + .method(method, skipBody ? null : buildBody()) .build(); } @@ -114,7 +114,7 @@ public T execute() throws Auth0Exception { try { Reader charStream = body.charStream(); return getAdapter().fromJson(charStream); - } catch (IOException e) { + } catch (IOException | JsonParseException e) { throw new Auth0Exception("Failed to parse response to request to " + url, e); } finally { closeStream(body);