LiaDevelopers

Server reference

Every error code from the Lia SDK and the server API, what it means and what to do.

#In your page

SDK calls reject with an Error that has a code. Messages are in English for you, not for players: show your own words.

#Anywhere

CodeMeaningWhat to do
not_in_liaThe page isn't open inside the Lia app.Show "Open this in Lia".
not_readyLia hasn't finished opening your app, or Lia.inviteLink was called before Lia.init().Call Lia.init() first, then try again.
timeoutLia didn't answer within 20 seconds.Try again.
slow_downMore than 20 calls in one second.Call less often (don't call the SDK every frame).
busyAnother of Lia's screens (pay sheet, ad, dialog, picker, scanner, Face ID) is open.Wait for the first to finish.
unknown_methodLia doesn't know this call. An older Lia app, or a typo.Check Lia.isVersionAtLeast.
unsupportedThis phone can't (no sensor, no Face ID, clipboard unavailable).Offer another way.
failedSomething went wrong in Lia.Try again.
networkNo connection.Try again.
not_openLia has no player for this person in your app yet.Call Lia.init() first.
not_foundLia couldn't find your app for this person (paused, or no longer open to them).Close the app.

#Payments, ads and invites

CodeFromMeaning
cancelledLia.payThe person closed the pay sheet without paying.
no_productLia.payNo active product with that id.
insufficient_balanceLia.payNot enough $LIA. Lia's sheet shows this itself and stays open, so your page usually hears cancelled instead.
bad_formatLia.showAdNot rewarded, rewardedInterstitial or interstitial.
notifications_offLia.requestNotificationsYour app may not send notifications.
bad_start_paramLia.inviteFriend, Lia.inviteLinkNot 1 to 64 of letters, digits, _ and -.
bad_stake, bad_cursorLia.lobby.tablesA stake that isn't a number of LIA, or a cursor that isn't the next from before.
bad_reason, bad_note, bad_tableIdLia.lobby.reportA reason other than name, unfair, abuse or other; a note over 300 characters.
bad_sessionLia.lobbyLia couldn't renew the session. Try again.
slow_downLia.lobby.reportMore than 20 reports in a day.
bad_idempotency_keyLia.pay, Lia.inviteFriend, Lia.submitScore, cloud storage writesNot 1 to 64 of letters, digits, _, -, . and :.

Ad results that aren't a reward (cancelled, skipped, no_ad, too_soon) are answers, not errors: see Ads.

#Storage, scores, the phone

CodeFromMeaning
storage_fullStorage setItemCloud: 1024 keys. Device: 5 MB. Secure: 10 items.
bad_key, bad_keys, bad_value, bad_itemStorageA key or value that doesn't fit.
bad_scoreLia.submitScoreNot a whole number from 0 to 1,000,000,000,000.
bad_refresh_rateSensors' startNot 20 to 1000 ms.
unknown_screenLia.openLiaLinkNot one of Lia's screens.
bad_urlLia.openLinkNot an https address up to 2048 characters.

#Arguments

The SDK checks arguments before anything reaches Lia, and rejects (or throws) with bad_ and the argument's name: bad_productId, bad_text, bad_title, bad_body, bad_confirm, bad_message, bad_buttons, bad_button_type, bad_id, bad_position, bad_color, bad_text_color, bad_screen, bad_reason, bad_listener. Each method's page says which it can give.

#From the server API

Errors answer with a 4xx status and { "error": "<code>" }, sometimes with more fields.

StatusCodeFromMeaning
401bad_keyEvery endpointNo key, an unknown key, a live key while your app isn't live, or your app is paused.
400bad_amountPOST /rewardsNot a number above 0 and up to 10,000.
400bad_key_fieldPOST /rewardsThe reward's key (or, without one, the Idempotency-Key header) is missing or not 1 to 128 of letters, digits, _, ., : and -.
400bad_idempotency_keyAny POSTThe Idempotency-Key header isn't 1 to 128 of letters, digits, _, -, . and :.
409idempotency_key_in_useAny POSTA request with this key is still running. Wait a second (Retry-After: 1) and send it again.
422idempotency_key_reusedAny POSTThis key was used with a different body. Use a new key for a new request.
400bad_textPOST /notificationsEmpty, over 180 characters, or has a problem: link, phone or scam.
400bad_start_paramPOST /notificationsNot 1 to 64 of letters, digits, _ and -.
403notifications_offPOST /notificationsYour app may not send notifications.
403not_allowedPOST /notificationsThe player hasn't allowed your notifications.
404not_foundCharges, POST /ads/verifyNothing with that id in your key's mode.
404unknown_playerPOST /rewards, POST /notificationsNo such player (in your key's mode).
409refundedPOST /charges/:id/deliverThe charge was refunded. Don't deliver it.
409pool_emptyPOST /rewardsYour pool doesn't hold the amount. Has pool.
429daily_limitPOST /rewardsThe player's daily limit from your pool. Has dailyCapPerPlayer.
429rate_limitedPOST /notificationsA notification limit. May have retryAt.
400bad_table_id, bad_seats, bad_taken, bad_title, bad_amount, bad_expires_inPOST /lobby/tablesA field doesn't fit.
429too_many_tablesPOST /lobby/tablesThe host has 3 open tables. Has max.
409full, own_tablePOST /lobby/tables/:id/sitEvery seat is taken, or the player is the host.

POST /session/verify never errors for a bad token: it answers { "valid": false }.

Type to search every page, method and endpoint.