Describe the bug
I have noticed unexpected SDK behavior when I disconnect the device from the network when Prebid ad is auto-refreshing. MediationBannerAdUnit.fetchDemand returns FetchDemandResult.SERVER_ERROR and I think the correct one should be either NETWORK_ERROR or TIMEOUT.
I've checked implementation details and FetchDemandResult is parsed from the error message which in my case is:
SDK internal error: Invalid bid response: Initialization failed: No internet connection detected
I propose we change FetchDemandResult.parseErrorMessage to check if the message contains No internet connection detected and return NETWORK_ERROR.
To Reproduce
Steps to reproduce the behavior:
Show Prebid banner with auto refresh enabled
Disable network connection
Observe FetchDemandResult from `MediationBannerAdUnit.fetchDemand
You get FetchDemandResult.SERVER_ERROR suggesting there is some issue with the server
Expected behavior
SDK should return NETWORK_ERROR because the network is not available.
Describe the bug I have noticed unexpected SDK behavior when I disconnect the device from the network when Prebid ad is auto-refreshing.
MediationBannerAdUnit.fetchDemand
returnsFetchDemandResult.SERVER_ERROR
and I think the correct one should be eitherNETWORK_ERROR
orTIMEOUT
.I've checked implementation details and
FetchDemandResult
is parsed from the error message which in my case is:I propose we change
FetchDemandResult.parseErrorMessage
to check if the message containsNo internet connection detected
and returnNETWORK_ERROR
.To Reproduce Steps to reproduce the behavior:
FetchDemandResult
from `MediationBannerAdUnit.fetchDemandFetchDemandResult.SERVER_ERROR
suggesting there is some issue with the serverExpected behavior SDK should return
NETWORK_ERROR
because the network is not available.Smartphone