Skip to main content

Overview

When an ad fails to load, the DARO SDK delivers a unified error object, DaroError. Every error is converted into the same DaroErrorCode scheme, so publishers can handle errors with a single branching logic.
Available from daro-a 1.6.0 / daro-m 1.3.14.

The DaroError object

The load-failure callback delivers a DaroError object. Its key properties are:

Unified error codes

DaroErrorCode consists of the codes below. We recommend branching on errorCodeName (the enum) rather than on the raw integer value.

Initialization and configuration errors

Ad load failures

Network errors

Fullscreen ad state errors

These errors occur when the load/show order of fullscreen and rewarded ads is not correct. Most are internal SDK states and require no user-facing handling.

Handling errors

Load failures are delivered to each ad format listener’s onAdLoadFail(error: DaroError) callback. Branch on errorCodeName.
The previous onAdLoadFail(err: DaroAdLoadError) callback is retained for backward compatibility but is deprecated. Both the existing and new callbacks fire, so new code should implement only onAdLoadFail(error: DaroError).