Ansekai DocsAnsekai docs
All pages
Connections and security
Examples

SDK

Errors

Every failed call throws an AnsekaiError:

FieldWhat it is
codeA short name like version_conflict, compare against it
statusThe HTTP status of the answer
retryAfterSeconds to wait before trying again, 0 when it doesn't matter
messageA sentence for people
TypeScript
try {
  await ansekai.data.set("hero", hero, { version });
} catch (error) {
  if (error instanceof AnsekaiError && error.code === "version_conflict") {
    reloadHero();
  }
}

Codes you will meet

CodeMeans
invalid_keyThe game key is wrong
not_signed_inThe call needs a player
token_expiredThe session ended, sign in again
invalid_credentialsWrong email or password
email_takenThat email has an account
method_disabledThe game doesn't allow this way of signing in
sdk_disabledThe module is closed to game clients
wrong_connectionThe module only takes another connection now
game_stoppedThe game was deleted or its account is held
read_only_key, read_only_pathA rule doesn't let the client write there
version_conflictThe value changed since it was read
not_a_numberincrement on a value that isn't a number
value_too_largeThe value is over its size
too_many_keysThe player has 100 keys already
key_not_foundThe key isn't there
uploads_disabledPlayers can't upload in this game
file_too_largeThe file is over the largest size
storage_fullThe cloud saves of the plan are full
cache_fullThe cache has no room left
plugin_errorThe plugin crashed, the reason is in its logs
plugin_timeout, plugin_out_of_memoryThe run went over a limit
rpc_not_foundNo published plugin offers that function
room_not_found, room_full, not_invitedJoining a room didn't work
region_not_allowedThe game didn't pick that region for rooms
rate_limitedToo many calls, wait retryAfter seconds
timeout, network_errorThe server didn't answer, the SDK tells these apart

A code that a plugin passes to ansekai.fail arrives the same way, with status 422.

Updated November 21, 2026

Errors · Ansekai Docs