From 43fc54e4c1e5ac46572c677592116097c982d4b9 Mon Sep 17 00:00:00 2001 From: Luciano Balmaceda Date: Mon, 20 Feb 2017 16:23:04 -0300 Subject: [PATCH] fix invalid JSON parse source --- .../java/com/auth0/android/request/internal/BaseRequest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/auth0/src/main/java/com/auth0/android/request/internal/BaseRequest.java b/auth0/src/main/java/com/auth0/android/request/internal/BaseRequest.java index 5b79a95c9..ba59eda41 100755 --- a/auth0/src/main/java/com/auth0/android/request/internal/BaseRequest.java +++ b/auth0/src/main/java/com/auth0/android/request/internal/BaseRequest.java @@ -131,7 +131,7 @@ protected U parseUnsuccessfulResponse(Response response) { stringPayload = body.string(); Type mapType = new TypeToken>() { }.getType(); - Map mapPayload = gson.fromJson(body.charStream(), mapType); + Map mapPayload = gson.fromJson(stringPayload, mapType); return errorBuilder.from(mapPayload); } catch (JsonSyntaxException e) { return errorBuilder.from(stringPayload, response.code());