Skip to main content
The SDK surfaces three types of failure: initialization failures, reward delivery failures, and maintenance mode. Each requires a different response. The guiding principle is the same in all cases: never let a ZBD failure break your game.

Initialization failures

Init can fail for several reasons, and when it fails the modal cannot be shown — the rewards web app never loaded, so ShowModal() has nothing to display. That means the player-facing messaging is yours: read the failure reason off the completion object and surface your own message (or hide the rewards UI). Never fail silently, and never leave the player staring at a rewards button that does nothing.

Common init failure causes

Do not tie SDK initialization to any core gameplay logic. If Init fails, the game must continue working normally. Players who cannot earn rewards should not be blocked from playing.
ShowModal() is only useful once Init has succeeded. After a failed init the rewards web app isn’t loaded, so calling it does nothing — which is why every init-failure row above puts the message in your hands.

Maintenance mode

The ZBD platform occasionally enters maintenance mode. This is surfaced as a maintenance flag on SDK responses. It is not an error.
Maintenance mode can begin at any time, including mid-session. Handle it on every SDK response, not just during initialization.
Maintenance periods are temporary. Do not log them as errors or alert your on-call. They are expected operational events.

Reward delivery failures

Reward delivery can fail independently of initialization. The most common causes are network interruptions and maintenance mode.
Do not show reward failure messages to players. A failed reward is invisible to the player. The gameplay moment should feel the same whether the reward was delivered or not.

Full error scenario matrix

Platform differences

Test iOS and Android separately. The SDK’s attestation behavior, WebView rendering, and modal presentation can differ between platforms in ways that are not always obvious during development. Pay particular attention to:
  • Android back button: Handle the back button to close the modal if it’s open. See Integration.
  • iOS foreground transitions: The modal may need explicit handling when the app returns from background.
  • VPN detection: VPN behavior differs between iOS and Android network stacks. A VPN that passes on one platform may be flagged on the other.