Ad Error Handling

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

  • type: indicates the error type through the OguryAdError.Type enum, which distinguishes between loading errors (Load) and showing errors (Show).

  • code: An integer that identifies the specific error. Errors that can occur during ad loading or displaying are defined in the OguryLoadErrorCode and OguryShowErrorCode classes. Detailed explanations of these error codes are provided in the tables below to assist you in troubleshooting effectively.

  • message: 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

SDK_NOT_STARTED

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

SDK_NOT_PROPERLY_INITIALIZED

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

NO_ACTIVE_INTERNET_CONNECTION

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

INVALID_CONFIGURATION

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

AD_DISABLED_COUNTRY_NOT_OPENED

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

AD_DISABLED_CONSENT_DENIED

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

AD_DISABLED_CONSENT_MISSING

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

AD_DISABLED_UNSPECIFIED_REASON

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

AD_REQUEST_FAILED

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

NO_FILL

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

AD_PARSING_FAILED

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

AD_PRECACHING_FAILED

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

AD_PRECACHING_TIMEOUT

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

The OguryShowErrorCode enum values

Enum value
Description

SDK_NOT_STARTED

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

SDK_NOT_PROPERLY_INITIALIZED

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

NO_ACTIVE_INTERNET_CONNECTION

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

INVALID_CONFIGURATION

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

AD_DISABLED_COUNTRY_NOT_OPENED

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

AD_DISABLED_CONSENT_DENIED

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

AD_DISABLED_CONSENT_MISSING

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

AD_DISABLED_UNSPECIFIED_REASON

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

AD_EXPIRED

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

NO_AD_LOADED

No ad has been loaded.

VIEW_IN_BACKGROUND

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

ANOTHER_AD_ALREADY_DISPLAYED

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

WEBVIEW_TERMINATED_BY_SYSTEM

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.

Last updated

Was this helpful?