Marshal HttpResponseException in GooglePlayBillingManager

This commit is contained in:
ravi-signal authored and GitHub committed 2025-10-06 12:18:51 -05:00
1 parent d6c15ef1d5
commit 9751569dc7
2 files changed
+5 -3

No files matched your search

@@ -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);
}
@@ -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