diff --git a/service/src/main/java/org/whispersystems/textsecuregcm/subscriptions/GooglePlayBillingManager.java b/service/src/main/java/org/whispersystems/textsecuregcm/subscriptions/GooglePlayBillingManager.java index 04a598238..e42fb23b5 100644 --- a/service/src/main/java/org/whispersystems/textsecuregcm/subscriptions/GooglePlayBillingManager.java +++ b/service/src/main/java/org/whispersystems/textsecuregcm/subscriptions/GooglePlayBillingManager.java @@ -359,8 +359,10 @@ public class GooglePlayBillingManager implements SubscriptionPaymentProcessor { ? ((GoogleJsonResponseException) e).getDetails().toString() : ""; - logger.warn("Unexpected HTTP status code {} from androidpublisher: {}", e.getStatusCode(), details); - throw new UncheckedIOException(e); + final String message = + String.format("Unexpected HTTP status code %s from androidpublisher: %s", e.getStatusCode(), details); + logger.warn(message); + throw new UncheckedIOException(new IOException(message)); } catch (IOException e) { throw new UncheckedIOException(e); } diff --git a/service/src/test/java/org/whispersystems/textsecuregcm/subscriptions/GooglePlayBillingManagerTest.java b/service/src/test/java/org/whispersystems/textsecuregcm/subscriptions/GooglePlayBillingManagerTest.java index 60a71c55b..a0f2588ad 100644 --- a/service/src/test/java/org/whispersystems/textsecuregcm/subscriptions/GooglePlayBillingManagerTest.java +++ b/service/src/test/java/org/whispersystems/textsecuregcm/subscriptions/GooglePlayBillingManagerTest.java @@ -273,7 +273,7 @@ class GooglePlayBillingManagerTest { return Stream.of( Arguments.of(404, SubscriptionNotFoundException.class), Arguments.of(410, SubscriptionNotFoundException.class), - Arguments.of(400, HttpResponseException.class) + Arguments.of(400, IOException.class) ); } @ParameterizedTest