diff --git a/PrebidMobile/PrebidMobile-core/src/main/java/org/prebid/mobile/api/data/FetchDemandResult.java b/PrebidMobile/PrebidMobile-core/src/main/java/org/prebid/mobile/api/data/FetchDemandResult.java index 8ed13f962..c004bd45c 100644 --- a/PrebidMobile/PrebidMobile-core/src/main/java/org/prebid/mobile/api/data/FetchDemandResult.java +++ b/PrebidMobile/PrebidMobile-core/src/main/java/org/prebid/mobile/api/data/FetchDemandResult.java @@ -85,7 +85,7 @@ public static FetchDemandResult parseErrorMessage(String msg) { if (msg.contains("Timeout")) { return TIMEOUT; } - if (msg.contains("Network Error")) { + if (msg.contains("Network Error") || msg.contains("No internet")) { return NETWORK_ERROR; } if (requestMatcher.find() || msg.contains("No stored request")) { diff --git a/PrebidMobile/PrebidMobile-core/src/test/java/org/prebid/mobile/api/data/FetchDemandResultTest.java b/PrebidMobile/PrebidMobile-core/src/test/java/org/prebid/mobile/api/data/FetchDemandResultTest.java index 7af8f1871..ab0bdcd3a 100644 --- a/PrebidMobile/PrebidMobile-core/src/test/java/org/prebid/mobile/api/data/FetchDemandResultTest.java +++ b/PrebidMobile/PrebidMobile-core/src/test/java/org/prebid/mobile/api/data/FetchDemandResultTest.java @@ -38,6 +38,11 @@ public void whenParseErrorMessageAndNetworkErrorMsg_NetworkErrorResult() { assertEquals(NETWORK_ERROR, FetchDemandResult.parseErrorMessage("Network Error")); } + @Test + public void whenParseErrorMessageAndNetworkErrorMsg_NoInternetNetworkErrorResult() { + assertEquals(NETWORK_ERROR, FetchDemandResult.parseErrorMessage("SDK internal error: Invalid bid response: Initialization failed: No internet connection detected")); + } + @Test public void whenParseErrorMessageAndInvalidAccountMsg_InvalidAccountIdResult() { assertEquals(INVALID_ACCOUNT_ID, FetchDemandResult.parseErrorMessage("Invalid request: Stored Request with ID=\"0689a263-318d-448b-a3d4-b02e8a709d9da\" not found."));