Ad Error Handling

The ad format listeners let you track the ad lifecycle events, with a focus on error handling via the didFailWithError: callback. This callback returns an OguryAdError object containing detailed error information:

  • type: indicates the error type through the OguryAdErrorType enum, which distinguishes between loading errors (OguryAdErrorTypeLoad) and showing errors (OguryAdErrorTypeShow).

  • code: An integer that identifies the specific error. The enums OguryLoadErrorCode and OguryShowErrorCode define potential error codes that may occur during loading or showing ads. Further details on these enums are provided in the tables below.

  • localizedDescription: A descriptive message that provides additional context about the error.

You can utilize these details to diagnose the issue and take appropriate action to resolve it.

The OguryLoadErrorCode enum values

Enum value
Description

SDKNotStarted

The load could not proceed because the SDK appears to have not been started.

SDKNotProperlyInitialized

The load could not proceed because the SDK is not properly initialized.

NoActiveInternetConnection

The load could not proceed because there is no active Internet connection.

InvalidConfiguration

The load could not proceed due to an invalid SDK configuration.

AdDisabledCountryNotOpened

The load could not proceed because ads are disabled; the user’s country is not yet available for advertising.

AdDisabledConsentDenied

The load could not proceed because ads are disabled; the user has denied consent for advertising.

AdDisabledConsentMissing

The load could not proceed because ads are disabled; the user consent is missing or has not been provided.

AdDisabledUnspecifiedReason

The load could not proceed because ads are disabled for an unspecified reason.

AdRequestFailed

The load failed because the ad request encountered an error, and the server returned an unexpected response.

NoFill

No ad is currently available for this placement (no fill).

AdParsingFailed

The ad could not be loaded due to a failure in parsing.

AdPrecachingFailed

The ad could not be loaded due to a failure in ad precaching.

AdPrecachingTimeout

The ad could not be loaded as precaching exceeded the time limit and timed out.

The OguryShowErrorCode enum values

Enum value
Description

SDKNotStarted

The ad could not be displayed because the SDK appears to have not been started.

SDKNotProperlyInitialized

The ad could not be displayed because the SDK is not properly initialized.

NoActiveInternetConnection

The ad could not be displayed because there is no active Internet connection.

InvalidConfiguration

The ad could not be displayed due to an invalid SDK configuration.

AdDisabledCountryNotOpened

The ad could not be displayed because ads are disabled; the user’s country is not yet available for advertising.

AdDisabledConsentDenied

The ad could not be displayed because ads are disabled; the user has denied consent for advertising.

AdDisabledConsentMissing

The ad could not be displayed because ads are disabled; the user consent is missing or has not been provided.

AdDisabledUnspecifiedReason

The ad could not be displayed because ads are disabled for an unspecified reason.

AdExpired

The ad could not be displayed because the retention time of the loaded ad has expired.

NoAdLoaded

No ad has been loaded.

ViewInBackground

The ad could not be displayed because the application was running in the background.

AnotherAdAlreadyDisplayed

The ad could not be displayed because another ad is currently being displayed.

WebviewTerminatedBySystem

The ad could not be displayed because the WebView was terminated by the system, resulting in the ad being unloaded due to high resource consumption by the application.

ViewControllerPreventsAdFromBeingDisplayed

The ad could not be displayed because a ViewController is currently being presented, preventing the ad from displaying.

Last updated

Was this helpful?