Miniwall Docs
Web SDK

Errors

Every error and warning the SDK and its delivery API can produce, what causes it and how to fix it.

Where errors show up

CallLoad failuresOther errors
presentPaywall, mountPaywall, loadPaywallThe promise rejects. Use try/catch.onError
startAutoPlacementsonErroronError
React <Paywall>onErroronError
<uikit-paywall>uikit-error eventuikit-error event

API error codes

The delivery API answers errors as { error: { code, message } }. The SDK throws UIKit: followed by the message.

StatuscodeMessageCause and fix
401invalid_keyMissing or invalid public keyThe key is missing, mistyped, revoked, or not a pk_ key. Copy it from API keys.
403origin_not_allowedORIGIN is not in this project's allowed websitesAdd the site in Allowed websites.
404not_foundPlacement not foundThe key matches no placement. Check spelling and the project.
404not_foundPaywall not foundThe placement has no screen chosen.
404not_foundPublished paywall not foundThe screen was never published (or was deleted). Publish it.
400bad_requestBody must be JSON, or a field messageAn events request was malformed. Not caused by normal use.
429rate_limitedToo many events, slow downMore than 1200 events a minute on one key. Events are dropped.
500internalSomething went wrong on our side. Try again.Server fault. A saved copy is used if there is one.

A 5xx answer, a network failure or a timeout uses the saved copy when one exists. A 4xx answer is never replaced by a copy.

Messages thrown by the SDK

MessageCause and fix
UIKit: call configure({ apiKey }) before loading a placementCall configure first.
UIKit: the paywall took too long to loadNo answer within timeoutMs and no saved copy.
UIKit: could not load paywall (STATUS)A non-OK answer with no message.
Could not load paywall (STATUS) from URLA URL source answered non-2xx.
Not a paywall JSON: expected components_config.baseThe JSON or URL does not hold a screen.
UIKit: pass onPurchase to handle purchase buttonsA purchase button was tapped with no onPurchase. Sent to onError.
UIKit: set element.onPurchase to handle purchase buttonsThe same, for the web component.
UIKit: screen ID could not be loadedA linked screen failed to load. It is retried on the next tap.
UIKit: not opening "..." : only http(s), mailto and tel links openA link with another scheme was refused.

Warnings

[UIKit] No price for package(s) ... Pass them in products is logged to the console when a package ID has no price.

On this page