Error reference
Every failure is a TriggairError with
{ code, message, agentHint, requestId }. The
agentHint tells you how to fix the call; each code below links
to its full fix.
- bad_request (400)
The request was malformed — a missing/invalid field, a bad slot/board/key name, or non-JSON body.
- unauthorized (401)
No valid credential. A game-scoped call needs the publishable key; a player-scoped call also needs a player token.
- forbidden (403)
Authenticated but not allowed — e.g. a banned player, or Turnstile is required for a new anonymous player.
- cors_forbidden (403)
The browser Origin isn't in the game's allowed_origins. The classic 'works locally, 403s once deployed' trap.
- conflict (409)
The action conflicts with current state — e.g. a handle already taken, a friendship you've blocked, or a daily reward already claimed today.
- save_conflict (409)
An optimistic-concurrency (OCC) save conflict: the slot's version changed since you read it (a lost race or a stale If-Match).
- not_found (404)
The resource doesn't exist for this caller — an empty save slot, an unconfigured/disabled board, or a game/id you don't own.
- payload_too_large (413)
The body exceeds a limit — a save > 256 KB, a config > 64 KB, or a share context > 4 KB.
- quota_exceeded (402)
A plan limit was hit — save slots (3 on free), the monthly-active-player cap, or another metered ceiling.
- insufficient_funds (402)
A wallet spend was denied because the balance would go negative. Balances never go negative — the whole transaction rolled back (you did not spend and fail to receive).
- unknown_currency (400)
A grant or spend referenced a currency that isn't defined for this game. Currencies are explicit definitions — there is no implicit create.
- unknown_item (400)
A grant, consume, or store listing referenced an item that isn't in the game's catalog. Items are explicit definitions — there is no implicit create.
- insufficient_item (409)
A consume/spend asked for more of an item than the player owns. Inventory quantities never go negative — the whole transaction rolled back.
- store_limit_reached (403)
The player already bought this listing up to its per-player purchase_limit.
- out_of_stock (409)
The store listing's global stock is exhausted.
- rate_limited (429)
Too many requests — the global token bucket or a per-board submission cap. A `Retry-After` header (and X-RateLimit-*) tells you when.
- internal (500)
An unexpected server error. Rare and transient.