Skip to content

InterstitialAd.onError ​

Listen for interstitial ad load or display failure events.

Failures in both the loading phase and the display phase are reported through this event. After a failure, clean up the ad instance and create a new one when the next ad is needed.

Parameters ​

function listener ​

The listener for interstitial ad load or display failure events.

Parameters ​

Object err ​

PropertyTypeDescription
errMsgstringError message
errCodenumberError code

Example ​

javascript
interstitialAd.onError((err) => {
    console.error('Interstitial ad load or display failed', err.errMsg, err.errCode);
});